zy <cdq...@gmail.com> added the comment:

I do not have documents on this subject. Though, I found that GNU iconv(1) 
behaves the same as my proposed behavior. My reading of the source code 
suggests that iconv(1) treat all encodings equally, which I think should also 
be true for python.

As of security concerns, I do not think the change in decoding function itself 
would introduce any security vulnerabilities. If a security issue arises 
because of the proposed change, there must be improper code out side of python, 
which is out of python's control. That said, the proposed change is unlikely to 
introduce new security vulnerability, as all it does in effect is retaining a 
few ascii characters in the string to the output as opposed to removing.  In 
the issue of wordpress, if we suppose that wordpress was written in python, and 
that the attacker was using gb2312 encoded strings instead of gbk, then my 
proposed change would by chance fix the issue, as the backslash would be 
retained when we decode the string.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12016>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to