# HG changeset patch # User Thomas Waldmann # Date 1237048076 -3600 # Node ID e673b8b21dc2e41a442db80025139974b19d4150 # Parent 268004c7b2065ae36284ad743ab27130d849e85c remove unneeded code: the filename we get from werkzeug is already preprocessed to fix IE bugs diff -r 268004c7b206 -r e673b8b21dc2 MoinMoin/action/AttachFile.py --- a/MoinMoin/action/AttachFile.py Sat Mar 14 17:02:31 2009 +0100 +++ b/MoinMoin/action/AttachFile.py Sat Mar 14 17:27:56 2009 +0100 @@ -527,17 +527,6 @@ request.theme.send_closing_html() -def preprocess_filename(filename): - """ preprocess the filename we got from upload form, - strip leading drive and path (IE misbehaviour) - """ - if filename and len(filename) > 1 and (filename[1] == ':' or filename[0] == '\\'): # C:.... or \path... or \\server\... - bsindex = filename.rfind('\\') - if bsindex >= 0: - filename = filename[bsindex+1:] - return filename - - def _do_upload(pagename, request): _ = request.getText # Currently we only check TextCha for upload (this is what spammers ususally do), diff -r 268004c7b206 -r e673b8b21dc2 MoinMoin/action/Load.py --- a/MoinMoin/action/Load.py Sat Mar 14 17:02:31 2009 +0100 +++ b/MoinMoin/action/Load.py Sat Mar 14 17:27:56 2009 +0100 @@ -52,7 +52,6 @@ else: target = filename - target = AttachFile.preprocess_filename(target) target = wikiutil.clean_input(target) if target: