| @@ 50-52 (lines=3) @@ | ||
| 47 | throw new HttpException('invalid redirect_to URL', 400); |
|
| 48 | } |
|
| 49 | // extract the "host" part of the URL |
|
| 50 | if (false === $redirectToHost = parse_url($redirectTo, PHP_URL_HOST)) { |
|
| 51 | throw new HttpException('invalid redirect_to URL, unable to extract host', 400); |
|
| 52 | } |
|
| 53 | if ($request->getServerName() !== $redirectToHost) { |
|
| 54 | throw new HttpException('redirect_to does not match expected host', 400); |
|
| 55 | } |
|
| @@ 125-127 (lines=3) @@ | ||
| 122 | } |
|
| 123 | ||
| 124 | // extract the "host" part of the URL |
|
| 125 | if (false === $redirectToHost = parse_url($redirectTo, PHP_URL_HOST)) { |
|
| 126 | throw new HttpException('invalid redirect_to URL, unable to extract host', 400); |
|
| 127 | } |
|
| 128 | if ($request->getServerName() !== $redirectToHost) { |
|
| 129 | throw new HttpException('redirect_to does not match expected host', 400); |
|
| 130 | } |
|