diff --git a/lib/OAuth2.php b/lib/OAuth2.php index 92b8c79..ffd4088 100644 --- a/lib/OAuth2.php +++ b/lib/OAuth2.php @@ -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; + } } }