Description
The system let you create bad page names, some can not be delete later. Alternative description: The system will allow to shoot yourself in the foot.
Example
/___ or http://moinmoin.wikiwikiweb.de:8000/MoinMoinBugs/CanCreateBadNames/_20_20_20
Note: the first page in the table is [space][space][space]...
/& or http://moinmoin.wikiwikiweb.de:8000/MoinMoinBugs/CanCreateBadNames/_26
/?action=edit - You can't come back to this page with this url: http://moinmoin.wikiwikiweb.de/MoinMoinBugs/CanCreateBadNames/?action=edit . Instead, it create the nonexisting page "/" for editing...
With 1.3, the URL would be http://moinmoin.wikiwikiweb.de/MoinMoinBugs/CanCreateBadNames/%3faction%3dedit (in fact, entering that URL works in 1.2 as well, but it doesn't produce it) which is imho legitimate (though I'd like moin to strip leading and trailing slashes!). -- JohannesBerg
FrontPage - name with leading spaces can be a great source of confusion!
http://moinmoin.wikiwikiweb.de:8000/_00 - NULL page
and many more...
Details
MoinMoin Version |
1.3/This wiki |
Discussion
We can prevent some names ("///", "/%20 /%20/","\\"). It will be hard to prevent most names since they can be in any language.
It seems that unquoting url we are shooting ourself in the foot: http://moinmoin.wikiwikiweb.de:8000/_20Template is unquoted internally to http://moinmoin.wikiwikiweb.de:8000/[space]Template. Without the unquoting, this name would be saved on the disk as _20Template, and would be just a strange name. With the quoting, this page looks identical to the page Template.
Most problems are caused by unquoting urls - you can't create most names using links on a page. If we stop unquoting urls - sub pages will not work, because the links appear in the browser as Page_2fSubPage, instead of Page/SubPage.
What can be done
Strip white space that is never usable automatically, without annoying error messages, and preventing rarely usable messy names, which clash with URL structure.
- Strip leading and trailing white space from page names in a path automatically
" page one / page two /three" -> "page one/page two/three"
- Do not allow empty names for a pages in a path
"page/ /subpage" will return an error message, or converted to page/subpage
Do not allow reserved characters in names as in http://www.ietf.org/rfc/rfc2396.txt section 2.2. Reserved Characters, except "/" which separate pages in a path
I don't think this is possible as we want to have UTF-8 URLs, so those characters might be needed. Besides, having those in wiki names shouldn't hurt at all as they're %-escaped. -- JohannesBerg
- Do not unquote filenames in URLs. The internal quoting scheme of the wiki should be not be public
_2f or (2f) will not convert to /
I don't quite understand this, isn't this the same as the next item? -- JohannesBerg
- Use only standard %xx quoting in all URLs the wiki produce. Seems that 1.3 is already using this system.
Yes, 1.3 does this -- JohannesBerg
The goal of items 4 and 5 is to be "completely transparent". Ideally, people could name a page with any arbitrary Unicode sequence of letters.
Then there are 2 mappings:
Unicode <--> URI. There's no reason to use anything other than the standard W3C %xx quoting.
Unicode <--> filename. This is completely internal. If we switch to a completely different Unicode <--> filename mapping function, and then rename the files appropriately, users should not notice any change.
Exactly what 1.3 is doing, modulo any bugs. -- JohannesBerg
See also PageNames
Plan
- Priority: Medium - does not interrupt general use
- Assigned to:
- Status: Fixed patch-212.