Skip to content

Share the redirect origin check, NEWS for #978 and #979 - #986

Merged
benoitc merged 1 commit into
masterfrom
chore/redirect-origin-followup
Oct 25, 2026
Merged

benoitc merged 1 commit into
masterfrom
chore/redirect-origin-followup

Conversation

@benoitc

@benoitc benoitc commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Follow-up to #979. The HTTP/1.1 and HTTP/2 redirect path and the HTTP/3 one each had their own copy of the origin check; both now use hackney_url:same_origin/2. The test-only export #979 added to hackney.erl is removed: the origin cases move to hackney_url unit tests, and location_trusted gets an end-to-end redirect test.

Also adds the NEWS entries for #978 and #979, including the stricter trust behaviour when pinned cacerts include public roots. No behaviour change.

hackney.erl and hackney_h3.erl each had their own same_origin/2; both
redirect paths now use hackney_url:same_origin/2. The test-only export
of maybe_strip_auth_on_redirect/3 is gone: the origin cases are unit
tests on hackney_url, and location_trusted is covered end to end.
@benoitc
benoitc merged commit 138f83e into master Oct 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant