diff MoinMoin/action/_tests/test_attachfile.py @ 5098:ff588e9e24d6

simplify getAttachUrl: remove upload parameter upload=x didn't influence drawing url generation at all, for file url generation one can just give do='upload_form' if one wants the upload url. URL args for do='upload_form' were streamlined to use target=x instead of rename=x so it is more similar to the other code. Removed test for "tainted" file names in URLs. We must not "taint" file names for URLs. Filenames in URLs need to be url-quoted. If a URL is used in html, it needs to be escaped.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 13 Sep 2009 00:06:04 +0200
parents e6190a499a7e
children
line wrap: on
line diff
--- a/MoinMoin/action/_tests/test_attachfile.py	Sat Sep 12 21:42:55 2009 +0200
+++ b/MoinMoin/action/_tests/test_attachfile.py	Sun Sep 13 00:06:04 2009 +0200
@@ -66,14 +66,4 @@
 
         assert file_exists
 
-    def test_getAttachUrl(self):
-        """
-        Tests if AttachFile.getAttachUrl taints a filename
-        """
-        filename = "<test2.txt>"
-        expect = "rename=_test2.txt_"
-        result = AttachFile.getAttachUrl(self.pagename, filename, self.request, upload=True)
-
-        assert expect in result
-
 coverage_modules = ['MoinMoin.action.AttachFile']