Check if url is external in validation function

refs: #4970
This commit is contained in:
Valentina Da Rold 2023-01-09 10:03:09 +01:00 committed by Johannes Meyer
parent 39b91684d8
commit 963c3168b1
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class InternalUrlValidator extends Zend_Validate_Abstract
public function isValid($value)
{
$url = Url::fromPath($value);
if ($url->getRelativeUrl() === '' || $url->getScheme() !== Icinga::app()->getRequest()->getScheme()) {
if ($url->getRelativeUrl() === '' || $url->isExternal()) {
$this->_error('IS_EXTERNAL');
return false;