Submitted by : simon at: 2003-10-26T21:32:15+00:00 (14 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

Using the latest version of zwiki (0.21.0rc3), an attempt to upload a file with a quote in it (e-fulfillment spec's.doc) results in a traceback::

Site Error

An error was encountered while publishing this resource.

Bad Request Sorry, a site error occurred.

Traceback (innermost last):
  File C:\Usr\ZOPEDE~1.1\lib\python\ZPublisher\Publish.py, line 150, in publish_module
  File C:\Usr\ZOPEDE~1.1\lib\python\ZPublisher\Publish.py, line 114, in publish
  File C:\Usr\ZOPEDE~1.1\lib\python\Zope\__init__.py, line 159, in zpublisher_exception_hook
    (Object: AutoExpireURLs)
  File C:\Usr\ZOPEDE~1.1\lib\python\ZPublisher\Publish.py, line 98, in publish
  File C:\Usr\ZOPEDE~1.1\lib\python\ZPublisher\mapply.py, line 88, in mapply
    (Object: edit)
  File C:\Usr\ZOPEDE~1.1\lib\python\ZPublisher\Publish.py, line 39, in call_object
    (Object: edit)
  File C:\Usr\ZOPEDE~1.1\lib\python\Products\ZWiki\ZWikiPage.py, line 1663, in edit
    (Object: AutoExpireURLs)
  File C:\Usr\ZOPEDE~1.1\lib\python\Products\ZWiki\ZWikiPage.py, line 1948, in _handleFileUpload
    (Object: AutoExpireURLs)
  File C:\Usr\ZOPEDE~1.1\lib\python\Products\ZWiki\ZWikiPage.py, line 1987, in _createFileOrImage
    (Object: AutoExpireURLs)
  File C:\Usr\ZOPEDE~1.1\lib\python\OFS\ObjectManager.py, line 236, in _setObject
    (Object: wiki)
  File C:\Usr\ZOPEDE~1.1\lib\python\OFS\ObjectManager.py, line 55, in checkValidId
    (Object: wiki)
Bad Request


comments:

Update -- Fri, 08 Aug 2003 04:08:38 +0000 reply
This is still a problem with the latest version, I believe.

Update --SimonMichael, Fri, 08 Aug 2003 18:05:33 +0000 reply
Thanks. The problem is that filenames need to be converted to a legal zope id, which can't contain certain characters. canonicalIdFrom() might be the way to do this. Patch, anyone ?

patch is in darcs --betabug, Sat, 19 May 2007 07:55:33 -0700 reply
Status: open => closed

We're changing the id of uploaded files only if necessary.