mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-22 05:49:05 +02:00
isPathAllowed decodes the incoming request path (and Badger already sends Go's decoded req.URL.Path), but compared it against the rule pattern as raw text. isValidUrlGlobPattern rejects raw spaces and non-ASCII and only accepts them percent-encoded, so a PATH rule such as `/my%20docs/*` or `/caf%C3%A9` was stored as `my%20docs` / `caf%C3%A9` and compared against `my docs` / `café`, and could therefore never match any request. Run the pattern through the same decodeAndResolvePath normalisation as the request path so both sides are compared in decoded form. Claude-Session: https://claude.ai/code/session_0134ujLF81GyXsCByibLcYsz