Using slash (/) in wiki title gives 404 #3593

Closed
opened 2025-11-02 05:18:27 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @bobemoe on GitHub (Jul 15, 2019).

Description

I've put a slash into one of my Wiki page titles, and now I can not access that page, it just 404's.

#2869 seems to have fixed a similar issue

I've tested on try.gitea.io and it works fine so I suspect its my server setup? I'm using Apache 2.4.25-3+deb9u7 on a Virtualmin server. Using simple conf with apache proxy:

ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/

I have tried various values for AllowEncodedSlashes in apache conf, and it makes a difference but doesnt fix it:

  • AllowEncodedSlashes On

    Asks me to authenticate with auth basic: https://xxxx is requesting your username and password. The site says: “.”

  • AllowEncodedSlashes Off

    The requested URL /bobemoe/test/wiki/test/ing was not found on this server.

  • AllowEncodedSlashes NoDecode

    Redirects me back to /bobemoe/test/wiki/_pages

Not sure where to look next? Any clues? Thanks.

Originally created by @bobemoe on GitHub (Jul 15, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.10.0+dev-45-g4091e0dfe - Git version: 2.11.0 - Operating system: Devuan Linux - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No works as expected https://try.gitea.io/bobemoe/test/wiki/test%2Fing - [ ] Not relevant - Log gist: ## Description I've put a slash into one of my Wiki page titles, and now I can not access that page, it just 404's. #2869 seems to have fixed a similar issue I've tested on try.gitea.io and it works fine so I suspect its my server setup? I'm using Apache 2.4.25-3+deb9u7 on a Virtualmin server. Using simple conf with apache proxy: ``` ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ ``` I have tried various values for `AllowEncodedSlashes` in apache conf, and it makes a difference but doesnt fix it: * AllowEncodedSlashes On Asks me to authenticate with auth basic: `https://xxxx is requesting your username and password. The site says: “.”` * AllowEncodedSlashes Off `The requested URL /bobemoe/test/wiki/test/ing was not found on this server.` * AllowEncodedSlashes NoDecode Redirects me back to /bobemoe/test/wiki/_pages Not sure where to look next? Any clues? Thanks.
GiteaMirror added the type/bug label 2025-11-02 05:18:28 -06:00
Author
Owner

@gary-kim commented on GitHub (Jul 20, 2019):

You can fix this in your Apache proxy configuration. Append nocanon to your ProxyPass directive then reload httpd.

For example, this is my proxy configuration:

AllowEncodedSlashes NoDecode
ProxyPass / http://127.0.0.1:3000/ retry=0 nocanon
ProxyPassReverse / http://127.0.0.1:3000/
@gary-kim commented on GitHub (Jul 20, 2019): You can fix this in your Apache proxy configuration. Append `nocanon` to your `ProxyPass` directive then reload httpd. For example, this is my proxy configuration: ``` AllowEncodedSlashes NoDecode ProxyPass / http://127.0.0.1:3000/ retry=0 nocanon ProxyPassReverse / http://127.0.0.1:3000/ ```
Author
Owner

@gary-kim commented on GitHub (Jul 20, 2019):

I'll make a pull request adding that to the documentation.

@gary-kim commented on GitHub (Jul 20, 2019): I'll make a pull request adding that to the documentation.
Author
Owner

@bobemoe commented on GitHub (Jul 23, 2019):

Thanks @gary-kim I can confirm this fixes my issue :)

@bobemoe commented on GitHub (Jul 23, 2019): Thanks @gary-kim I can confirm this fixes my issue :)
Author
Owner

@theironrobin commented on GitHub (May 15, 2020):

Anyone know the fix for nginx?

@theironrobin commented on GitHub (May 15, 2020): Anyone know the fix for nginx?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3593