[issue23777] argparse subcommand action can't be specified

2015-03-25 Thread SpaceOne
New submission from SpaceOne: parser.add_subparsers(dest='arguments', action='append') will raise the following exception: File /usr/lib/python2.7/argparse.py, line 1675, in add_subparsers action = parsers_class(option_strings=[], **kwargs) TypeError: __init__() got an unexpected keyword

[issue23487] argparse: add_subparsers 'action' broken

2015-03-25 Thread SpaceOne
SpaceOne added the comment: In replay to msg238931 from paul j3 (paul.j3) * And specifying something other than the default 'store' action class for the arguments of the parsers doesn't make sense. Of course it makes sense. If you e.g. want the action to be 'append' so that the subparser

[issue9698] When reusing an handler, urllib(2)'s digest authentication fails after multiple regative replies

2015-03-26 Thread SpaceOne
Changes by SpaceOne pyt...@florianbest.de: -- nosy: +spaceone ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9698 ___ ___ Python-bugs-list mailing

[issue24089] argparse crashes with AssertionError

2015-04-30 Thread SpaceOne
New submission from SpaceOne: Just add an argument with metavar='[PROTOCOL://]HOST[:PORT]' ([...] twice in the string) causes the following traceback: Traceback (most recent call last): File curl.py, line 182, in module arguments = parser.parse_args() File /usr/lib/python2.7

[issue11874] argparse assertion failure with brackets in metavars

2015-05-05 Thread SpaceOne
Changes by SpaceOne pyt...@florianbest.de: -- nosy: +spaceone ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___ ___ Python-bugs-list mailing

[issue24558] shutil.copytree with symlinks=True opens vulnerabilities

2015-07-03 Thread SpaceOne
New submission from SpaceOne: shutil.copytree(src, dst, symlink=True) destroys file system permissions and open security issues. See the following python/bash session: # ls -l /etc/shadow -rw-r- 1 root shadow 1114 May 8 19:10 /etc/shadow # su foobar $ ln -s /etc/shadow exit # python -c

[issue24558] shutil.copytree with symlinks=True opens vulnerabilities

2015-07-03 Thread SpaceOne
SpaceOne added the comment: argh. sorry. I did not read the following lines in my environment which caused this by a recursive chown. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue24558] shutil.copytree with symlinks=True opens vulnerabilities

2015-07-03 Thread SpaceOne
SpaceOne added the comment: my workaround is: import os.path def ignore(src, names): return [name for name in names if os.path.islink(os.path.join(src, name))] shutil.copytree(src, dst, ignore=ignore) -- ___ Python tracker rep...@bugs.python.org

[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SpaceOne
SpaceOne added the comment: It makes error handling really hard. Here is a patch: https://github.com/python/cpython/compare/master...spaceone:idna?expand=1 -- status: closed -> open ___ Python tracker <rep...@bugs.python.org> <http://bug

[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SpaceOne
SpaceOne added the comment: Because i need to do everywhere where I use this: try: user_input.encode(encoding) except UnicodeDecodeError: raise except (UnicodeError, UnicodeEncodeError): do_my_error_handling() instead of try: user_input.encode(encoding) except

[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SpaceOne
SpaceOne added the comment: I know that UnicodeEncodeError is a subclass of UnicodeError. The problem here is that UnicodeError would also catch UnicodeDecodeError. This is especially disturbing if you catch errors of a whole function. If you e.g. use python2.7 you might want to catch only

[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-16 Thread SpaceOne
SpaceOne added the comment: But why is the error UnicodeError instead of UnicodeEncodeError? -- resolution: not a bug -> status: closed -> open ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-16 Thread SpaceOne
New submission from SpaceOne: Python 3.4.2 (default, Oct 8 2014, 10:45:20) >>> u'..'.encode('idna') Traceback (most recent call last): File "/usr/lib/python3.4/encodings/idna.py", line 165, in encode raise UnicodeError("label empty or too long") UnicodeE

[issue25738] http.server doesn't handle RESET CONTENT status correctly

2015-11-26 Thread SpaceOne
New submission from SpaceOne: The status 205 RESET CONTENT is not correctly evaluated by http.server. It MUST NOT write a response body to the client. Patch: https://github.com/spaceone/cpython/commit/17048e2e7349cc4861c7fe90299f2c092b8e1604 -- components: Library (Lib) messages

[issue25739] Add PAYLOAD_TOO_LARGE (new name in RFC 7231)

2015-11-26 Thread SpaceOne
New submission from SpaceOne: Add PAYLOAD_TOO_LARGE status code to http package. Patch: https://github.com/spaceone/cpython/commit/5d9427a07bde43b523386322b1fc377618eadb76 -- components: Library (Lib) messages: 255444 nosy: spaceone priority: normal severity: normal status: open title

[issue25723] ConfigParser should never write broken configurations

2015-11-26 Thread SpaceOne
SpaceOne added the comment: Of course both of you have reasonable arguments. For compatibility with overridden SECTRE attributes it should not raise ValueError for characters like [ and ]. (too bad that SECTRE is a public attribute otherwise it could also be used to validate the name

[issue25739] Add PAYLOAD_TOO_LARGE / URI_TOO_LONG (new name in RFC 7231)

2015-11-26 Thread SpaceOne
SpaceOne added the comment: Also URI_TOO_LONG has been changed. https://tools.ietf.org/html/rfc7231#section-6.5.11 https://tools.ietf.org/html/rfc7231#section-6.5.12 -- title: Add PAYLOAD_TOO_LARGE (new name in RFC 7231) -> Add PAYLOAD_TOO_LARGE / URI_TOO_LONG (new name in RFC 7

[issue25740] multiple issues in http.client

2015-11-26 Thread SpaceOne
New submission from SpaceOne: * RESET_CONTENT not evaluated * negative chunk size accepted * invalid ports accepted * success status !== 200 ignored Patch: https://github.com/spaceone/cpython/commit/3289080306408db971f8b816d3e9f0ab44ed392b Part of github Pull Request https://github.com/python

[issue25723] ConfigParser should never write broken configurations

2015-11-25 Thread SpaceOne
SpaceOne added the comment: Isn't is an actual problem in the field? We had a vulnerability in our code due to this as we only sanitized the config values and didn't recognized that add_section() does no validation of input. -- ___ Python tracker

[issue20923] ConfigParser should nested [] in section names.

2015-11-24 Thread SpaceOne
SpaceOne added the comment: Sorry about that! I created http://bugs.python.org/issue25723. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue20923] ConfigParser should nested [] in section names.

2015-11-24 Thread SpaceOne
SpaceOne added the comment: IMHO your rejection is stupid. User input should always be validated. At least a ValueError should be raised if add_section() is called with a string containing ']\x00\n['. As this will always create a broken configuration. Otherwise ConfigParser cannot be used

[issue25723] ConfigParser should never write broken configurations

2015-11-24 Thread SpaceOne
New submission from SpaceOne: >>> from configparser import ConfigParser >>> from io import StringIO >>> from configparser import ConfigParser >>> c = ConfigParser() >>> c.add_section('foo]\nbar=baz\n[bar') >>> fd = StringIO() >>>

[issue25723] ConfigParser should never write broken configurations

2015-11-24 Thread SpaceOne
SpaceOne added the comment: I would have expected something like ValueError('A section must not contain any of ...') or at least that the characters are simply stripped. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue26196] Argparse breaks when a switch is given an argument beginning with a dash

2016-06-15 Thread SpaceOne
Changes by SpaceOne <pyt...@florianbest.de>: -- nosy: +spaceone ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26196> ___ __

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2016-06-15 Thread SpaceOne
Changes by SpaceOne <pyt...@florianbest.de>: -- nosy: +spaceone ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9334> ___ __

[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread SpaceOne
SpaceOne added the comment: Nice that you investigate again into this issue. Could you please test if this still happens on python 2.7.10 as I unfortunately have no environment with that version. This would be very kind of you! -- ___ Python

[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread SpaceOne
SpaceOne added the comment: Hello, The resolution of this bug is "not a bug". If that is the case can you please add information how to fix/workaround this. I have got the following valid-seeming code: """ import cookielib import urllib import urllib2 cookie = coo

[issue40837] email.utils.encode_rfc2231(string, None, None) returns broken value

2020-05-31 Thread SpaceOne
New submission from SpaceOne : `encode_rfc2231()` must not change the returned value if no transformation of the input was done. This is also mentioned in the docstring of that function. Actual behavior: encode_rfc2231('foo bar', None, None) 'foo%20bar' Expected behavior: encode_rfc2231('foo

[issue46943] fix[imaplib]: call Exception with string instance

2022-03-07 Thread SpaceOne
New submission from SpaceOne : imaplib raises an Exception with a bytes instance once (in login()) - all other places str instances are raised. Adjust the behavior of login() similar to authenticate() where self.error is called with a str instance. Especially for Python3 with strict bytes

[issue46943] fix[imaplib]: call Exception with string instance

2022-03-07 Thread SpaceOne
Change by SpaceOne : -- keywords: +patch pull_requests: +29837 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31722 ___ Python tracker <https://bugs.python.org/issu

[issue46943] fix[imaplib]: call Exception with string instance

2022-03-11 Thread SpaceOne
SpaceOne added the comment: @iritkatriel they were automatically added by github via your `.github/CODEOWNERS` file with the `**/*imap* @python/email-team` match. And they all will also be informed by another pull request

[issue46943] fix[imaplib]: call Exception with string instance

2022-03-11 Thread SpaceOne
Change by SpaceOne : -- pull_requests: +29920 pull_request: https://github.com/python/cpython/pull/31823 ___ Python tracker <https://bugs.python.org/issue46

[issue46943] fix[imaplib]: call Exception with string instance

2022-03-11 Thread SpaceOne
SpaceOne added the comment: @iritkatriel I added a unit test to the branch. I can't create a new PR without creating a new branch. But that doesn't make much sense from a technical point. It only increases the number of existing merge requests. Also all the people subscribed to the current

[issue46943] fix[imaplib]: call Exception with string instance

2022-03-11 Thread SpaceOne
SpaceOne added the comment: @iritkatriel alright, I am sorry. I created another PR: https://github.com/python/cpython/pull/31823 -- ___ Python tracker <https://bugs.python.org/issue46