"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "library/Icinga/Web/Form/Validator/InternalUrlValidator.php" between
icingaweb2-2.11.3.tar.gz and icingaweb2-2.11.4.tar.gz

About: Icinga Web 2 is an Web interface for Icinga 2, a network and computer system monitoring system.

InternalUrlValidator.php  (icingaweb2-2.11.3):InternalUrlValidator.php  (icingaweb2-2.11.4)
skipping to change at line 21 skipping to change at line 21
* Validator that checks whether a textfield doesn't contain an external URL * Validator that checks whether a textfield doesn't contain an external URL
*/ */
class InternalUrlValidator extends Zend_Validate_Abstract class InternalUrlValidator extends Zend_Validate_Abstract
{ {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
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;
} }
return true; return true;
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)