Skip to content

Commit 034720e

Browse files
authored
Merge pull request #121 from CarltonSoftware/valid-uri-check
Update OAuth2.php
2 parents 606b8ea + d92fbf6 commit 034720e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/OAuth2.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,8 +1433,11 @@ protected function validateRedirectUri($inputUri, $storedUris)
14331433

14341434
foreach ($storedUris as $storedUri) {
14351435
if (strcasecmp(substr($inputUri, 0, strlen($storedUri)), $storedUri) === 0) {
1436-
return parse_url($inputUri, PHP_URL_HOST) === parse_url($storedUri, PHP_URL_HOST) &&
1437-
parse_url($inputUri, PHP_URL_PORT) === parse_url($storedUri, PHP_URL_PORT);
1436+
if (parse_url($inputUri, PHP_URL_HOST) === parse_url($storedUri, PHP_URL_HOST)
1437+
&& parse_url($inputUri, PHP_URL_PORT) === parse_url($storedUri, PHP_URL_PORT)
1438+
) {
1439+
return true;
1440+
}
14381441
}
14391442
}
14401443

0 commit comments

Comments
 (0)