mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
InternalUrlValidator: Also check the scheme
(cherry picked from commit 3187a4e549af978d428ddd9b05ccee7b5766e39e)
This commit is contained in:
parent
a82a88a34b
commit
c6a05031b8
@ -3,6 +3,7 @@
|
||||
|
||||
namespace Icinga\Web\Form\Validator;
|
||||
|
||||
use Icinga\Application\Icinga;
|
||||
use Zend_Validate_Abstract;
|
||||
use Icinga\Web\Url;
|
||||
|
||||
@ -16,7 +17,8 @@ class InternalUrlValidator extends Zend_Validate_Abstract
|
||||
*/
|
||||
public function isValid($value)
|
||||
{
|
||||
if (Url::fromPath($value)->getRelativeUrl() === '') {
|
||||
$url = Url::fromPath($value);
|
||||
if ($url->getRelativeUrl() === '' || $url->getScheme() !== Icinga::app()->getRequest()->getScheme()) {
|
||||
$this->_error('IS_EXTERNAL');
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user