We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2e43153 + 4690d76 commit 14fb409Copy full SHA for 14fb409
lib/SimpleSAML/Utilities.php
@@ -310,13 +310,12 @@ public static function addURLparameter($url, $parameter) {
310
* allowed by configuration.
311
*/
312
public static function checkURLAllowed($url, array $trustedSites = NULL) {
313
- $url = self::normalizeURL($url);
314
-
315
- // verify that the URL points to an http or https site
316
- if (!preg_match('@^https?://@i', $url)) {
317
- throw new SimpleSAML_Error_Exception('Invalid URL: '.$url);
+ if (empty($url)) {
+ return '';
318
}
319
+ $url = self::normalizeURL($url);
+
320
// get the white list of domains
321
if ($trustedSites === NULL) {
322
$trustedSites = SimpleSAML_Configuration::getInstance()->getArray('trusted.url.domains', NULL);
0 commit comments