forgejo/routers
Gusted 652a99da11 fix: use correct input for strip slashes middleware (#7295)
- The router must use the escaped path in order to ensure correct functionality (at least, that is what they say). However `req.URL.Path` shouldn't be set to the escaped path, which is fixed in this patch.
- Simplify the logic and no longer try to use `rctx.RoutePath`, this is only useful if the middleware was placed after some routing parsing was done.
- Resolves forgejo/forgejo#7294
- Resolves forgejo/forgejo#7292
- Add unit test

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7295
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
(cherry picked from commit cff284fdc3)
2025-03-22 16:50:00 +00:00
..
api [v10.0/forgejo] fix(api): typo in API description for repoSearch (#7202) 2025-03-11 14:03:19 +00:00
common fix: use correct input for strip slashes middleware (#7295) 2025-03-22 16:50:00 +00:00
install [CHORE] Move to new sessioner library 2024-08-25 03:47:08 +02:00
private [CHORE] Use forked binding library 2024-11-05 22:47:34 +01:00
utils [PORT] drop utils.IsExternalURL (and expand IsRiskyRedirectURL tests) (#3167) 2024-04-15 13:03:08 +00:00
web [v10.0/forgejo] fix: no notification for replies to pending comments (#7178) 2025-03-09 16:06:01 +00:00
init.go Revert "Open telemetry integration (#3972)" 2024-08-07 11:22:43 +02:00