Skip to content

PB-2205: regex too weak#73

Merged
hansmannj merged 1 commit intodevelopfrom
fix_PB-2205_regex_could_be_bypasses
Feb 10, 2026
Merged

PB-2205: regex too weak#73
hansmannj merged 1 commit intodevelopfrom
fix_PB-2205_regex_could_be_bypasses

Conversation

@hansmannj
Copy link
Copy Markdown
Member

Currently, the regex for preventing qrcoding URLs other than map.geo.admin can be bypassed, e.g. by map.geo.admin.ch.attacker.com, since the regex is too weak. Hence the regex was anchored to make sure, that the URL to be qrcoded is exactly map.geo.admin.ch, rather than checking, that the string is somewhere in the URL.

Currently, the regex for preventing qrcoding URLs other than map.geo.admin
can be bypassed, e.g. by map.geo.admin.ch.attacker.com, since the regex is too weak.
Hence the regex was anchored to make sure, that the URL to be qrcoded is exactly
map.geo.admin.ch, rather than checking, that the string is somewhere in the URL.
@hansmannj hansmannj requested a review from ltshb February 9, 2026 15:03
@github-actions github-actions bot added the bug label Feb 9, 2026
@hansmannj hansmannj changed the title PB-2205: regex to weak PB-2205: regex too weak Feb 9, 2026
@hansmannj hansmannj merged commit 241be33 into develop Feb 10, 2026
5 checks passed
@hansmannj hansmannj deleted the fix_PB-2205_regex_could_be_bypasses branch February 10, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants