mirror of
https://github.com/angular/angular.git
synced 2026-11-23 07:05:14 -05:00
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)