forgejo/services
forgejo-backport-action dde3f51c72 [v10.0/forgejo] fix: use correct input for strip slashes middleware (#7306)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/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

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7295): <!--number 7295 --><!--line 0 --><!--description dXNlIGNvcnJlY3QgaW5wdXQgZm9yIHN0cmlwIHNsYXNoZXMgbWlkZGxld2FyZQ==-->use correct input for strip slashes middleware<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7306
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-03-22 17:30:28 +00:00
..
actions fix(sec): web route update and delete runner variables 2025-02-08 06:04:14 +00:00
agit fix(agit): run full pr checks on force-push 2024-08-12 09:00:41 +02:00
asymkey tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
attachment tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
auth fix: Revert "allow synchronizing user status from OAuth2 login providers (#31572)" 2024-12-12 05:59:06 +01:00
automerge Add branch auto deletion for scheduled PRs 2024-10-31 03:49:15 +01:00
context [v10.0/forgejo] fix: use correct input for strip slashes middleware (#7306) 2025-03-22 17:30:28 +00:00
contexttest [TESTS] Fix usage of LoadRepoCommit 2024-08-26 08:03:48 +02:00
convert Merge pull request '[gitea] week 2024-52 cherry pick (gitea/main -> forgejo)' (#6342) from earl-warren/wcp/2024-52 into forgejo 2024-12-24 06:28:36 +00:00
cron Clear up old Actions logs (#31735) 2024-08-04 18:24:10 +02:00
doctor [v10.0/forgejo] fix: load settings for valid user and email check (#6678) 2025-01-24 12:25:00 +00:00
externalaccount fix: Revert "allow synchronizing user status from OAuth2 login providers (#31572)" 2024-12-12 05:59:06 +01:00
f3 fix: f3: label color must start with # 2025-01-07 20:52:48 +00:00
federation feat: access ActivityPub client through interfaces to facilitate mocking in unit tests (#4853) 2024-08-07 05:45:24 +00:00
feed tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
forgejo tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
forms feat: allow changing default branch update style 2024-12-23 18:55:25 +03:00
gitdiff improve performance of diffs (#32393) 2024-11-05 09:39:21 +01:00
indexer Update issue indexer after merging a PR (#30715) 2024-05-12 20:03:10 +02:00
issue demilestone should not include milestone (#32923) 2024-12-30 08:26:54 +00:00
lfs Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) 2024-11-05 09:33:15 +01:00
mailer Improve usage of HMAC output for mailer tokens 2024-11-15 10:59:36 +01:00
markup Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
migrations [v10.0/forgejo] fix: do not allow SSH url for migration (#7018) 2025-02-21 11:46:08 +00:00
mirror [PORT] Fix git error handling (gitea#32401) 2024-11-03 16:47:44 +01:00
notify Clean up log messages (#30313) 2024-04-15 20:01:35 +02:00
org Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
packages Add support for indexing arch files 2024-12-09 11:34:50 +08:00
pull tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
release Trim title before insert/update to database to match the size requirements of database (#32498) 2024-11-17 12:18:56 +01:00
remote Enable unparam linter (#31277) 2024-06-16 13:42:58 +02:00
repository fix: repo avatar generating (#6338) 2024-12-22 18:18:37 +01:00
secrets Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
shared/automerge create "shared" package to workaround import loop issues 2024-10-31 03:49:14 +01:00
task feat(quota): Quota enforcement 2024-08-02 11:10:34 +02:00
uinotification Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
user Do not rewrite ssh keys files when deleting a user without one (#6097) 2024-12-05 21:32:09 +00:00
webhook Add more load functions to make sure the reference object loaded (#32901) 2024-12-22 08:46:38 +01:00
wiki Show page titles in wiki search results (#6048) 2024-11-24 15:55:34 +01:00