Files
angular/packages/platform-server
Alan Agius 928dcfd258 fix(platform-server): reject protocol-relative paths in resolveUrl
Previously, resolveUrl only checked whether the raw URL string started with '//' before WHATWG URL resolution. When given an input such as '/.//evil.test', WHATWG dot-segment normalization popped the leading '/.', leaving a pathname starting with '//'. This corrupted ServerPlatformLocation and led to protocol-relative open redirects in SSR.

Now, resolveUrl also verifies that the normalized URL pathname does not start with '//' when allowProtocolRelative is false.

Fixes #71076

(cherry picked from commit d7d81e189d)
2026-09-30 14:19:36 +00:00
..
2024-03-28 13:02:50 -07:00