| @@ 57-59 (lines=3) @@ | ||
| 54 | throw new HttpException('invalid redirect_to URL', 400); |
|
| 55 | } |
|
| 56 | // extract the "host" part of the URL |
|
| 57 | if (false === $redirectToHost = parse_url($redirectTo, PHP_URL_HOST)) { |
|
| 58 | throw new HttpException('invalid redirect_to URL, unable to extract host', 400); |
|
| 59 | } |
|
| 60 | if ($request->getServerName() !== $redirectToHost) { |
|
| 61 | throw new HttpException('redirect_to does not match expected host', 400); |
|
| 62 | } |
|
| @@ 65-67 (lines=3) @@ | ||
| 62 | } |
|
| 63 | ||
| 64 | // extract the "host" part of the URL |
|
| 65 | if (false === $redirectToHost = parse_url($redirectTo, PHP_URL_HOST)) { |
|
| 66 | throw new HttpException('invalid redirect_to URL, unable to extract host', 400); |
|
| 67 | } |
|
| 68 | if ($request->getServerName() !== $redirectToHost) { |
|
| 69 | throw new HttpException('redirect_to does not match expected host', 400); |
|
| 70 | } |
|