Description

Excessively long URLs produce a traceback in MoinMoin. A more friendly and intelligent error message should be outputted instead.

The raised error is "IOError [Errno 36] File name too long"

Steps to reproduce

  1. http://moinmoin.wikiwikiweb.de/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Details

MoinMoin Version

1.3.1

OS and Version

Gentoo Linux

Python Version

2.3.4

Server Setup

Apache+mod_python, Twisted, ...

Workaround

Limiting the URL or HTTP header length from the webserver.

Discussion

We should reject invalid page names or map them to legal ones.

the work is done in RequestBase.run and the normalisation is just called if the pagename contains /

Currently we don't check for too long page names - we can check this only after we create the file system name, which might be much longer then the original name. I don't see any need to remap page names, just show proper error when the name is too long. "The name is too long, choose another name".

One existing problem with page names is the temporary names, which use format like #name.timestamp#, instead of saving the temporary file in the page directory. This make certain valid names invalid (in Hebrew for example). Because of quoting, the maximum Hebrew name length is about 63 characters, so using 10 characters for temp file name can lead to an error when the name is just fine.

I'm pending this bug because its not a real problem, just an extreme case which don't happen in general use. -- NirSoffer 2005-01-01 18:26:19

The bug was fixed by catching the exception and showing a standard error message.

We might consider also:

  1. Check if improving temporary files names handling can prevent the error message when the page name is not too long, just the temporary file name is too long.
  2. Auto shortening of names as part of normalization, instead of showing an error message, just cut the name at maximum length and send the user to the shortened name. Might be hard to do with non ascii names, as we know the real length only in the quoted form, and we can shorten the name only in the original Unicode form.

Plan


CategoryMoinMoinBugFixed CategoryRelease1.3.5

MoinMoin: MoinMoinBugs/TooLongPagenameTraceback (last edited 2007-10-29 19:21:42 by localhost)