Description
For your information...
Chuan-kai Lin has reported the following bug against Debian moin package, which uses werkzeug 0.6 (moinmoin official tarball ships 0.5.1):
Redirect is broken, if the target page contains a space.
Steps to reproduce
Case 1
Create a page, with a redirect to a page with a space, like:
#redirect Sample Page
The page will redirect to Sample%2520Page rather than Sample Page.
Case 2
When I search for a term using the MoinMoin built-in search functionality, and the search term matches exactly one document whose name contains a space, the search functionality redirects the user to a broken URL that does not exist. The redirected URL is broken due to incorrect white-space escape. For example, suppose the search functionality should redirect the user to the "Debian Rocks" page:
http://wiki_host/Debian%20Rocks
Instead, the bug causes MoinMoin to redirect the user to this page:
http://wiki_host/Debian%2520Rocks
So, instead of seeing the page that matches the search term, the user sees a "This page does not exist yet" empty page.
Example
Component selection
- MoinMoin/web/contexts.py (and werkzeug)
Details
MoinMoin Version |
1.9.2 |
OS and Version |
Debian Squeeze (and Ubuntu) |
Python Version |
2.5 |
Server Setup |
WSGI |
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
It has to be checked whether werkzeug changed target url quoting behaviour in 0.6 or whether this also happens with 0.5.1 (and is a bug in moin).
- redirects (pragma and search with 1 result) work for me with builtin werkzeug 0.5.1
- shows buggy behaviour (prama (after editing page, so cached rendered page gets regenerated) and search with 1 result) for 0.6 and 0.6.1
Solved. werkzeug 0.6.x does special processing if it gets a unicode url for redirect(). We just give it str url now.
Plan
- Priority:
- Assigned to:
Status: fixed by http://hg.moinmo.in/moin/1.9/rev/80a7f3cd237b