Skip to content

Commit 14fb409

Browse files
authored
Merge pull request #1 from GoIntegro/hotfix/simplesamlphp-issue-99
Fixed default relaystate url
2 parents 2e43153 + 4690d76 commit 14fb409

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/SimpleSAML/Utilities.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,12 @@ public static function addURLparameter($url, $parameter) {
310310
* allowed by configuration.
311311
*/
312312
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);
313+
if (empty($url)) {
314+
return '';
318315
}
319316

317+
$url = self::normalizeURL($url);
318+
320319
// get the white list of domains
321320
if ($trustedSites === NULL) {
322321
$trustedSites = SimpleSAML_Configuration::getInstance()->getArray('trusted.url.domains', NULL);

0 commit comments

Comments
 (0)