Skip to content

Commit

Permalink
Merge pull request #121 from CarltonSoftware/valid-uri-check
Browse files Browse the repository at this point in the history
Update OAuth2.php
  • Loading branch information
GuilhemN authored Mar 14, 2020
2 parents 606b8ea + d92fbf6 commit 034720e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/OAuth2.php
Original file line number Diff line number Diff line change
Expand Up @@ -1433,8 +1433,11 @@ protected function validateRedirectUri($inputUri, $storedUris)

foreach ($storedUris as $storedUri) {
if (strcasecmp(substr($inputUri, 0, strlen($storedUri)), $storedUri) === 0) {
return parse_url($inputUri, PHP_URL_HOST) === parse_url($storedUri, PHP_URL_HOST) &&
parse_url($inputUri, PHP_URL_PORT) === parse_url($storedUri, PHP_URL_PORT);
if (parse_url($inputUri, PHP_URL_HOST) === parse_url($storedUri, PHP_URL_HOST)
&& parse_url($inputUri, PHP_URL_PORT) === parse_url($storedUri, PHP_URL_PORT)
) {
return true;
}
}
}

Expand Down

0 comments on commit 034720e

Please sign in to comment.