[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Ma Lin for finding the problem! Don't know why you close the PR but anyway, we solve it finally. -- ___ Python tracker ___

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 4e7457b85316e6591a4f0c3a4d0807bfdf7a2bea by Xiang Zhang in branch '2.7': bpo-29990: Fix range checking in GB18030 decoder (#1509) https://github.com/python/cpython/commit/4e7457b85316e6591a4f0c3a4d0807bfdf7a2bea --

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___ Pyt

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 72e1b61da0920c5607481304879e039b63e2a3d5 by Xiang Zhang in branch '3.6': bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1507) https://github.com/python/cpython/commit/72e1b61da0920c5607481304879e039b63e2a3d5 --

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset f5f7870d9322b46ab87c45b2c4c46f6b10ecbd70 by Xiang Zhang in branch '3.5': bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1508) https://github.com/python/cpython/commit/f5f7870d9322b46ab87c45b2c4c46f6b10ecbd70 --

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1611 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1610 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1609 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue29990] Range checking in GB18030 decoder

2017-05-08 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 9da408d15bdef624a5632182cb4edf98001fa82f by Xiang Zhang in branch 'master': bpo-29990: Fix range checking in GB18030 decoder (#1495) https://github.com/python/cpython/commit/9da408d15bdef624a5632182cb4edf98001fa82f -- _

[issue29990] Range checking in GB18030 decoder

2017-05-07 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1597 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue29990] Range checking in GB18030 decoder

2017-04-14 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: patch review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue29990] Range checking in GB18030 decoder

2017-04-06 Thread Ma Lin
Ma Lin added the comment: This is a very trivial bug, it's hard to imagine a scene that someone trying to decode those 8630 illegal 4-byte sequences with GB18030 decoder. And I think this bug can't lead to security vulnerabilities. As far as I can see, GB2312/GBK/GB18030 codecs are bugfree exce

[issue29990] Range checking in GB18030 decoder

2017-04-05 Thread STINNER Victor
STINNER Victor added the comment: An incorrect implementation of a decoder might lead to security vulnerabilities: http://unicodebook.readthedocs.io/issues.html#security-vulnerabilities *But* UTF-8 decoder of Python 2 is *not* strict and nobody complained. I suggest that, once the changed is me

[issue29990] Range checking in GB18030 decoder

2017-04-05 Thread Xiang Zhang
Xiang Zhang added the comment: Yes, 0x80 doesn't matter here. It's nice to make the backporting PRs. But let's wait some time for ezio and haypo's comments and reviews. Get the master PR merged first and then continue on backporting. :-) -- ___ Pyt

[issue29990] Range checking in GB18030 decoder

2017-04-05 Thread Ma Lin
Ma Lin added the comment: > except 0x80 (€) I suppose the English edition is not the final release of GB18030-2000. At the end of official Chinese edition of GB18030-2005, listed the difference between GB18030-2000 and GB18030-2005 clearly, it doesn't mention 0x80 (€), so GB18030-2000 should

[issue29990] Range checking in GB18030 decoder

2017-04-05 Thread Xiang Zhang
Changes by Xiang Zhang : -- stage: -> patch review versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bu

[issue29990] Range checking in GB18030 decoder

2017-04-05 Thread Xiang Zhang
Xiang Zhang added the comment: The table in wikipedia is somewhat complex. I find ftp://ftp.software.ibm.com/software/globalization/documents/gb18030m.pdf and the table in it is same as https://pan.baidu.com/share/link?shareid=2606985291&uk=3341026630 (except 0x80) but in English. I agree wit

[issue29990] Range checking in GB18030 decoder

2017-04-04 Thread Ma Lin
Changes by Ma Lin : -- pull_requests: +1171 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue29990] Range checking in GB18030 decoder

2017-04-04 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue29990] Range checking in GB18030 decoder

2017-04-04 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1168 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue29990] Range checking in GB18030 decoder

2017-04-04 Thread Ma Lin
New submission from Ma Lin: This issue is split from issue24117, that issue became a soup of small issues, so I'm going to close it. For 4-byte GB18030 sequence, the legal range is: 0x81-0xFE for the 1st byte 0x30-0x39 for the 2nd byte 0x81-0xFE for the 3rd byte 0x30-0x39 for the 4th byte GB180