Project

General

Profile

Bug #21544 » 0012581_followup.patch

Administrator Admin, 2009-11-25 00:53

View differences:

t3lib/class.t3lib_div.php (Arbeitskopie)
* @return boolean Whether the given URL is valid
*/
public static function isValidUrl($url) {
return (filter_var($url, FILTER_VALIDATE_URL) !== false);
return (filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) !== false);
}
......
);
// Pass if URL is on the current host:
if (self::isValidUrl($decodedUrl) && preg_match('#^[a-z0-9]+://#', $decodedUrl)) {
if (self::isValidUrl($decodedUrl)) {
if (self::isOnCurrentHost($decodedUrl) && strpos($decodedUrl, self::getIndpEnv('TYPO3_SITE_URL')) === 0) {
$sanitizedUrl = $url;
}
(2-2/2)