Description

action Load loads any content to a wiki page. It should determine the file and reject everything other than major type text.

Component selection

Details

MoinMoin Version

this wiki

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

Detecting the mimetype (e.g. from the file extension) has quite some problems as we all know, so I would rather object that.

But what we can do is to check if the uploaded content decodes from utf-8 to unicode. For some arbitrary binary file, that is rather unlikely to succeed.

That maybe also catches Load action for text in invalid (non config.charset) encodings.

Also, the text shown for Load action should be checked if it is understandable enough for wiki users.

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/LoadPageContent (last edited 2008-08-21 17:53:01 by ThomasWaldmann)