quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Lehuen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (MODPYTHON-25) apply_fs_data() does not work with "new style" objects
Date Wed, 02 Mar 2005 20:37:48 GMT
     [ http://issues.apache.org/jira/browse/MODPYTHON-25?page=history ]
     
Nicolas Lehuen resolved MODPYTHON-25:
-------------------------------------

      Assign To: Nicolas Lehuen
     Resolution: Fixed
    Fix Version: 3.2.0

This bug is already fixed by all the prospective work done during January about the security
issue. A unit test was added to check for it.

> apply_fs_data() does not work with "new style" objects
> ------------------------------------------------------
>
>          Key: MODPYTHON-25
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-25
>      Project: mod_python
>         Type: Bug
>     Versions: 3.1.3
>  Environment: gentoo-linux, apache 2, python 2.3.4
>     Reporter: Bruno Desthuilliers
>     Assignee: Nicolas Lehuen
>     Priority: Minor
>      Fix For: 3.2.0

>
> util.py v.1.21, apply_fs_data() 
> Trying to publish instances of a new style class, you get an exception 
> (UnboundLocalError: local variable 'fc' referenced before assignment)
> pointing to util.py, line 356
> What happens is that the test line 336 doesn't work for new style classes, letting the
code fallback to line 356 without fc being defined.
> The fix is pretty trivial: rewrite line 336 as:
>     if type(obj) is InstanceType or isinstance(obj, object):
> Which leads to a second fix: the first arg of the function is named 'object', which seems
sensible, but is also the name of the new style classes base class, so s/object/obj/ in that
code is also needed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message