[zope2-tracker] [Bug 672846] [NEW] checkValidId breaks on unicode ids

Elizabeth Leddy 672846 at bugs.launchpad.net
Mon Nov 8 20:48:06 EST 2010


Public bug reported:

In OFS, ObjectManager.py, if you send in a unicode id it raises bad a
bad request, although it seems like one should still be able to send it
in. The code looks like its missing an else statement:

def checkValidId(self, id, allow_dup=0):
    ...
    if not id or not isinstance(id, str):
        if isinstance(id, unicode):
            id = escape(id)
        raise BadRequest, ('Empty or invalid id specified', id)
    ...

Based on this it looks like the bad request error should only be thrown if the id is not unicode. Hard to say for sure though.
Running Zope 2.12 but it looks like its in the latest release as well.

** Affects: zope2
     Importance: Undecided
         Status: New

-- 
checkValidId breaks on unicode ids
https://bugs.launchpad.net/bugs/672846
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.


More information about the zope2-tracker mailing list