-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoded path will be decoded by middleware.StripSlashes
and mismatch routers
#23242
Labels
Comments
lunny
added a commit
that referenced
this issue
Mar 4, 2023
Changes in this PR : Strips incoming request URL of additional slashes (/). For example an input like `https://git.data.coop//halfd/new-website.git` is translated to `https://git.data.coop/halfd/new-website.git` Fixes #20462 Fix #23242 --------- Co-authored-by: zeripath <[email protected]> Co-authored-by: Jason Song <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this issue
Mar 4, 2023
…itea#21333) Changes in this PR : Strips incoming request URL of additional slashes (/). For example an input like `https://git.data.coop//halfd/new-website.git` is translated to `https://git.data.coop/halfd/new-website.git` Fixes go-gitea#20462 Fix go-gitea#23242 --------- Co-authored-by: zeripath <[email protected]> Co-authored-by: Jason Song <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
techknowlogick
pushed a commit
that referenced
this issue
Mar 5, 2023
…) (#23300) Backport #21333 Changes in this PR : Strips incoming request URL of additional slashes (/). For example an input like `https://git.data.coop//halfd/new-website.git` is translated to `https://git.data.coop/halfd/new-website.git` Fixes #20462 Fix #23242 Co-authored-by: Sandeep Bhat <[email protected]> Co-authored-by: zeripath <[email protected]> Co-authored-by: Jason Song <[email protected]> Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: delvh <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When everything is right:
https://gitea.com/gitea/blog
-> 200https://gitea.com/gitea%2Fblog
-> 404However:
https://gitea.com/gitea%2Fblog/
-> 200It is caused by a bug in
middleware.StripSlashes
of chi, see go-chi/chi#799We don't have to wait for it to be fixed in upstream, it can be fixed in #21333 by dropping
middleware.StripSlashes
.Gitea Version
7a5af25
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
command
Database
None
The text was updated successfully, but these errors were encountered: