A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-November/130219.html below:

[Python-Dev] Add transform() and untranform() methods

[Python-Dev] Add transform() and untranform() methods [Python-Dev] Add transform() and untranform() methodsSerhiy Storchaka storchaka at gmail.com
Fri Nov 15 11:46:41 CET 2013
15.11.13 12:28, Steven D'Aprano написав(ла):
> One benefit is:
>
> import codecs
> codec = get_name_of_compression_codec()
> result = codecs.encode(data, codec)

And this is a hole in a security if you don't check codec name before 
calling a codec. See topic about utilizing zip-bombs via codecs machinery.

Also usually you need more than just uncompress binary data by Python 
name. You need map external compression name to internal Python codec 
name, you need configure decompressor object by specific options, 
perhaps you need different buffering strategies for different 
compression algorithms. See for example zipfile and tarfile sources.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4