mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 00:04:04 +02:00
Check if url is external in validation function
refs: #4970 (cherry picked from commit 963c3168b16039dc012d8ae1d100163bb808b193)
This commit is contained in:
parent
8c52f68fd6
commit
1c90eaf6b5
@ -18,7 +18,7 @@ class InternalUrlValidator extends Zend_Validate_Abstract
|
|||||||
public function isValid($value)
|
public function isValid($value)
|
||||||
{
|
{
|
||||||
$url = Url::fromPath($value);
|
$url = Url::fromPath($value);
|
||||||
if ($url->getRelativeUrl() === '' || $url->getScheme() !== Icinga::app()->getRequest()->getScheme()) {
|
if ($url->getRelativeUrl() === '' || $url->isExternal()) {
|
||||||
$this->_error('IS_EXTERNAL');
|
$this->_error('IS_EXTERNAL');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user