mirror of
https://github.com/angular/angular.git
synced 2026-11-23 07:05:14 -05:00
Avoid String.prototype.trim() when classifying server request URLs because it strips Unicode whitespace that WHATWG URL parsing preserves as path data. This mismatch can cause xhr2 to send credentials to a different origin than the application approved. Classify the unmodified request URL so whitespace-prefixed input falls through URL resolution, and cover NBSP- and BOM-prefixed HTTP URLs. Fixes #70540