Challenge: Please break this! [Python Security]

Tim Wintle tim.wintle at teamrubber.com
Mon Feb 23 18:13:14 EST 2009


On Mon, 2009-02-23 at 13:20 -0800, Paul McNett wrote:
> tav wrote:
> > I'm keen to know your experiences even if you don't manage to write to
> > the filesystem -- and especially if you do!
> 
> Does it count when it breaks some standard libs that aren't even trying to write to 
> the filesystem?

It appears to prevent any imports from being allowed at all.

> 
> mac:ss pmcnett$ python sbs_studio.py pkm
> Traceback (most recent call last):
>    File "sbs_studio.py", line 159, in <module>
>      main()
>    File "sbs_studio.py", line 15, in main
>      parser = OptionParser()
>    File 
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/optparse.py", line 
> 1191, in __init__
>      self.set_usage(usage)
>    File 
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/optparse.py", line 
> 1266, in set_usage
>      self.usage = _("%prog [options]")
>    File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/gettext.py", 
> line 566, in gettext
>      return dgettext(_current_domain, message)
>    File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/gettext.py", 
> line 530, in dgettext
>      codeset=_localecodesets.get(domain))
>    File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/gettext.py", 
> line 465, in translation
>      mofiles = find(domain, localedir, languages, all=1)
>    File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/gettext.py", 
> line 437, in find
>      for nelang in _expand_lang(lang):
>    File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/gettext.py", 
> line 131, in _expand_lang
>      from locale import normalize
> ImportError: cannot import name normalize
> 
> Paul
> --
> http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list