This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients William Bowling, serhiy.storchaka, swgillespie, xtreak
Date 2018-09-23.15:42:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537717370.58.0.956365154283.issue26000@psf.upfronthosting.co.za>
In-reply-to
Content
Is this still reproducible? On master (Python 3.8) with a debug build it throws a SyntaxError. I don't have Python 3.5 installed to check this though

$ ./python.exe
Python 3.8.0a0 (heads/master:c87d9f406b, Sep 23 2018, 19:48:30)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
➜  cpython git:(master) ./python.exe -c 'with open("vuln.py", "wb") as f: f.write(b"\x61\x73\x00\x0a\x79\x6e\x63\x5c\x0a\xef")'
➜  cpython git:(master) ✗ ./python.exe vuln.py
  File "vuln.py", line 2
SyntaxError: Non-UTF-8 code starting with '\xef' in file vuln.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
➜  cpython git:(master) ✗ ./python.exe -c 'with open("vuln2.py", "wb") as f: f.write(b"\x61\x73\x00\x0a\x79\x6e\x63\x5c\x0a\x00\x0d\xdd")'
➜  cpython git:(master) ✗ ./python.exe vuln2.py
  File "vuln2.py", line 3
SyntaxError: Non-UTF-8 code starting with '\xdd' in file vuln2.py on line 3, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details


Thanks
History
Date User Action Args
2018-09-23 15:42:50xtreaksetrecipients: + xtreak, serhiy.storchaka, William Bowling, swgillespie
2018-09-23 15:42:50xtreaksetmessageid: <1537717370.58.0.956365154283.issue26000@psf.upfronthosting.co.za>
2018-09-23 15:42:50xtreaklinkissue26000 messages
2018-09-23 15:42:50xtreakcreate