Skip to content

fix(http): ensure query parameters are inserted before URL fragments#69152

Open
JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:http-quries
Open

fix(http): ensure query parameters are inserted before URL fragments#69152
JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:http-quries

Conversation

@JeanMeche
Copy link
Copy Markdown
Member

Previously, when making an HTTP request where the URL contained a fragment (#) and HttpParams were provided, the parameters were appended to the very end of the URL (after the fragment). This resulted in the parameters being treated as part of the fragment rather than query parameters, potentially bypassing server-side logic and validation. This commit updates the URL parsing logic in HttpRequest to split the URL by the fragment, correctly inserting the query string before any fragment.

@angular-robot angular-robot Bot added the area: common/http Issues related to HTTP and HTTP Client label Jun 4, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jun 4, 2026
@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Jun 4, 2026
Previously, when making an HTTP request where the URL contained a fragment (`#`) and `HttpParams` were provided, the parameters were appended to the very end of the URL (after the fragment). This resulted in the parameters being treated as part of the fragment rather than query parameters, potentially bypassing server-side logic and validation.
This commit updates the URL parsing logic in `HttpRequest` to split the URL by the fragment, correctly inserting the query string before any fragment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: common/http Issues related to HTTP and HTTP Client target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants