Skip to content

Fix an open redirect via $n captures and an import that could jump ahead of live rules - #50

Merged
wentz-s merged 2 commits into
devfrom
fix/open-redirect-and-import
Oct 15, 2026
Merged

wentz-s merged 2 commits into
devfrom
fix/open-redirect-and-import

Conversation

@ogesebastien

Copy link
Copy Markdown
Contributor

Edge — open redirect (47c9ff1). Filling $1 from the viewer's URL could move a redirect off the site: /$1 + //evil.com → Location: //evil.com, https://www.example.com$1 + @evil.com/ → evil.com. The edge now checks the target after substitution: path templates stay on the site (//evil.com → /evil.com), absolute templates keep their host, capture-led ones may only reach the viewer's host. Targets with whitespace/control characters (which browsers strip) or empty targets are not redirected. Refusals are logged once per rule, without the viewer's URL.

Console — import (ef955d0). When a host's existing rules couldn't be read, the import started from priority 0 and could place new rules in front of live ones. That host is now skipped, each of its rows says why, and other hosts still import.

Behaviour change: a rule that relies on a capture to redirect to another domain (including https://$1.example.com/) stops redirecting — write the domain in the template.

@wentz-s
wentz-s force-pushed the fix/open-redirect-and-import branch from ef955d0 to 8f2b1a7 Compare October 15, 2026 16:10
@wentz-s
wentz-s merged commit 462a364 into dev Oct 15, 2026
5 checks passed
@wentz-s
wentz-s deleted the fix/open-redirect-and-import branch October 15, 2026 16:22
@wentz-s wentz-s mentioned this pull request Oct 15, 2026
3 of 4 tasks
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.

2 participants