You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9c67728
Browse filesBrowse the repository at this point in the historyBrowse files
fix(tripwire): canonicalize the request path before matching (#57) (#58)
A hidden-path tripwire matched the raw path, so a scan could dress a decoy path
up and slip past while a webserver still resolved it to the file being hunted:
//.env, /%2Eenv, /%252Eenv, /static/..%2f.git/config, /x/../.env. Missing the
scan defeats the point of the tripwire.
canonicalizeTripwirePath now reduces the path the way a server would before
matching — drop query/fragment, ASCII percent-decode (bounded, so double
encoding resolves), collapse duplicate slashes, resolve . and .. keeping one
trailing slash — and the configured decoy paths are canonicalized the same way
so both sides line up. Legitimate lookalikes (/environment, /env/config) are
unaffected. Full suite green.
0 commit comments