[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16693773#comment-16693773 ] ASF GitHub Bot commented on THRIFT-4207: jeking3 commented on issue #1274: THRIFT-4207: Make sure Python Accelerated protocol does not allow invalid UTF-8 URL: https://github.com/apache/thrift/pull/1274#issuecomment-440424580 As I have been the only contributor to the conversation on this pull request for the last year, I'm closing this. Feel free to re-open if you have updates. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: Aki Sukegawa >Priority: Major > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16693774#comment-16693774 ] ASF GitHub Bot commented on THRIFT-4207: jeking3 closed pull request #1274: THRIFT-4207: Make sure Python Accelerated protocol does not allow invalid UTF-8 URL: https://github.com/apache/thrift/pull/1274 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/lib/py/src/ext/protocol.tcc b/lib/py/src/ext/protocol.tcc index c025d0c968..e2e782a6c1 100644 --- a/lib/py/src/ext/protocol.tcc +++ b/lib/py/src/ext/protocol.tcc @@ -419,6 +419,8 @@ bool ProtocolBase::encodeValue(PyObject* value, TType type, PyObject* type case T_STRING: { ScopedPyObject nval; +Py_ssize_t len; +char *str; if (PyUnicode_Check(value)) { nval.reset(PyUnicode_AsUTF8String(value)); @@ -426,11 +428,21 @@ bool ProtocolBase::encodeValue(PyObject* value, TType type, PyObject* type return false; } } else { + if (isUtf8(typeargs)) { +if (PyBytes_AsStringAndSize(value, &str, &len) < 0) { + return false; +} +// Check that input is a valid UTF-8 string. +nval.reset(PyUnicode_DecodeUTF8(str, len, 0)); +if (!nval) { + return false; +} + } Py_INCREF(value); nval.reset(value); } -Py_ssize_t len = PyBytes_Size(nval.get()); +len = PyBytes_Size(nval.get()); if (!detail::check_ssize_t_32(len)) { return false; } diff --git a/lib/py/src/protocol/TProtocol.py b/lib/py/src/protocol/TProtocol.py index fd20cb7906..588d997e57 100644 --- a/lib/py/src/protocol/TProtocol.py +++ b/lib/py/src/protocol/TProtocol.py @@ -118,6 +118,8 @@ def writeDouble(self, dub): pass def writeString(self, str_val): +if isinstance(str_val, bytes): +str_val = str_val.decode('utf8') self.writeBinary(str_to_binary(str_val)) def writeBinary(self, str_val): diff --git a/test/py/FastbinaryTest.py b/test/py/FastbinaryTest.py index 05c0bb6d15..2a87d5fddc 100755 --- a/test/py/FastbinaryTest.py +++ b/test/py/FastbinaryTest.py @@ -74,6 +74,9 @@ def isOpen(self): u"\x20\xce\x91\x74\x74\xce\xb1\xe2\x85\xbd\xce\xba"\ u"\xc7\x83\xe2\x80\xbc" +ooe_bad = OneOfEach() +ooe_bad.zomg_unicode = b'\xbe\xef\xff' + if sys.version_info[0] == 2 and os.environ.get('THRIFT_TEST_PY_NO_UTF8STRINGS'): ooe1.zomg_unicode = ooe1.zomg_unicode.encode('utf8') ooe2.zomg_unicode = ooe2.zomg_unicode.encode('utf8') @@ -167,6 +170,27 @@ def _check_read(self, o): pprint(repr(o)) raise Exception('read value mismatch') +def _check_bad_unicode(self, o): +if (sys.version_info[0] == 2 and +os.environ.get('THRIFT_TEST_PY_NO_UTF8STRINGS')): +return + +try: +prot_slow = self._slow(TTransport.TMemoryBuffer()) +o.write(prot_slow) +except UnicodeError: +pass +else: +raise Exception('UnicodeError not raised') + +try: +prot_fast = self._fast(TTransport.TMemoryBuffer()) +o.write(prot_fast) +except UnicodeError: +pass +else: +raise Exception('UnicodeError not raised') + def do_test(self): self._check_write(HolyMoley()) self._check_read(HolyMoley()) @@ -188,6 +212,8 @@ def do_test(self): self._check_read(Backwards(**{"first_tag2": 4, "second_tag1": 2})) +self._check_bad_unicode(ooe_bad) + # One case where the serialized form changes, but only superficially. o = Backwards(**{"first_tag2": 4, "second_tag1": 2}) trans_fast = TTransport.TMemoryBuffer() This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: Aki Sukegawa >Priority: Major > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > a
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16663061#comment-16663061 ] ASF GitHub Bot commented on THRIFT-4207: jeking3 commented on a change in pull request #1274: THRIFT-4207: Make sure Python Accelerated protocol does not allow invalid UTF-8 URL: https://github.com/apache/thrift/pull/1274#discussion_r228004916 ## File path: lib/py/src/protocol/TProtocol.py ## @@ -118,6 +118,8 @@ def writeDouble(self, dub): pass def writeString(self, str_val): +if isinstance(str_val, bytes): +str_val = str_val.decode('utf8') Review comment: Can `six` help here? `six.binary_type` for example. Or check for python version and use `bytearray` for py2 and bytes for py3? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: Aki Sukegawa >Priority: Major > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654359#comment-16654359 ] ASF GitHub Bot commented on THRIFT-4207: jeking3 commented on issue #1274: THRIFT-4207: Make sure Python Accelerated protocol does not allow invalid UTF-8 URL: https://github.com/apache/thrift/pull/1274#issuecomment-430822209 Many projects are struggling with this. StackStorm and Ansible are good examples. We need to continue to support 2.7 for a while longer. Until we can drop 2.7 support and fully change everything over, we should either close this out or change it so it works. From what I've seen in the description, it sounds like even six wouldn't be able to fix this. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: Aki Sukegawa >Priority: Major > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16430481#comment-16430481 ] ASF GitHub Bot commented on THRIFT-4207: jeking3 commented on issue #1274: THRIFT-4207: Make sure Python Accelerated protocol does not allow invalid UTF-8 URL: https://github.com/apache/thrift/pull/1274#issuecomment-379740486 Question: when do we drop python 2.7 support? Folks using python 2.7 can continue to use existing shipping versions of thrift. > Python 3.0 was released in 2008. The final 2.x version 2.7 release came out in mid-2010, with a statement of extended support for this end-of-life release. The 2.x branch will see no new major releases after that. 3.x is under active development and has already seen over five years of stable releases, including version 3.3 in 2012, 3.4 in 2014, 3.5 in 2015, and 3.6 in 2016. This means that all recent standard library improvements, for example, are only available by default in Python 3.x. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: Aki Sukegawa >Priority: Major > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223665#comment-16223665 ] ASF GitHub Bot commented on THRIFT-4207: Github user elprans commented on a diff in the pull request: https://github.com/apache/thrift/pull/1274#discussion_r147559605 --- Diff: lib/py/src/ext/protocol.tcc --- @@ -419,18 +419,30 @@ bool ProtocolBase::encodeValue(PyObject* value, TType type, PyObject* type case T_STRING: { ScopedPyObject nval; +Py_ssize_t len; +char *str; if (PyUnicode_Check(value)) { nval.reset(PyUnicode_AsUTF8String(value)); if (!nval) { return false; } } else { + if (isUtf8(typeargs)) { +if (PyBytes_AsStringAndSize(value, &str, &len) < 0) { + return false; +} +// Check that input is a valid UTF-8 string. +nval.reset(PyUnicode_DecodeUTF8(str, len, 0)); +if (!nval) { + return false; +} + } --- End diff -- I see no other way to check the validity without breaking backwards compat. On the other hand, this removes a real hazard of garbage data being written into unicode fields. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: James E. King, III > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223664#comment-16223664 ] ASF GitHub Bot commented on THRIFT-4207: Github user elprans commented on a diff in the pull request: https://github.com/apache/thrift/pull/1274#discussion_r147559529 --- Diff: lib/py/src/protocol/TProtocol.py --- @@ -118,6 +118,8 @@ def writeDouble(self, dub): pass def writeString(self, str_val): +if isinstance(str_val, bytes): +str_val = str_val.decode('utf8') --- End diff -- It does, yes. And its absence breaks py3.6. I'm working on a fix for this. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: James E. King, III > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223556#comment-16223556 ] ASF GitHub Bot commented on THRIFT-4207: Github user nsuke commented on a diff in the pull request: https://github.com/apache/thrift/pull/1274#discussion_r147556105 --- Diff: lib/py/src/ext/protocol.tcc --- @@ -419,18 +419,30 @@ bool ProtocolBase::encodeValue(PyObject* value, TType type, PyObject* type case T_STRING: { ScopedPyObject nval; +Py_ssize_t len; +char *str; if (PyUnicode_Check(value)) { nval.reset(PyUnicode_AsUTF8String(value)); if (!nval) { return false; } } else { + if (isUtf8(typeargs)) { +if (PyBytes_AsStringAndSize(value, &str, &len) < 0) { + return false; +} +// Check that input is a valid UTF-8 string. +nval.reset(PyUnicode_DecodeUTF8(str, len, 0)); +if (!nval) { + return false; +} + } --- End diff -- Doesn't this affect every user's performance who are passing relatively large utf8-encoded `byte` ? The problem might be that we're not rejecting `byte` in the first place. Although "fixing" that wouldn't be backward compatible. What do you think ? > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: James E. King, III > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223555#comment-16223555 ] ASF GitHub Bot commented on THRIFT-4207: Github user nsuke commented on a diff in the pull request: https://github.com/apache/thrift/pull/1274#discussion_r147555909 --- Diff: lib/py/src/protocol/TProtocol.py --- @@ -118,6 +118,8 @@ def writeDouble(self, dub): pass def writeString(self, str_val): +if isinstance(str_val, bytes): +str_val = str_val.decode('utf8') --- End diff -- This would break py2 > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: James E. King, III > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223497#comment-16223497 ] James E. King, III commented on THRIFT-4207: Any idea if this is related to: https://github.com/apache/thrift/pull/1289 ? > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: James E. King, III > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219265#comment-16219265 ] ASF GitHub Bot commented on THRIFT-4207: Github user jeking3 commented on the issue: https://github.com/apache/thrift/pull/1274 I pulled these changes into a sandbox and started the `ubuntu-xenial` docker image, and then ran `build/docker/scripts/autotools.sh` which is what Travis CI would do for one of the unit test jobs. It failed: ``` make[4]: Entering directory '/thrift/src/test/py' Executing individual test scripts with various generated code directories Directories to be tested: gen-py-default, gen-py-slots, gen-py-oldstyle, gen-py-no_utf8strings, gen-py-dynamic, gen-py-dynamicslots Scripts to be tested: FastbinaryTest.py, TestFrozen.py, TSimpleJSONProtocolTest.py, SerializationTest.py, TestEof.py, TestSyntax.py, TestSocket.py Testing script: /usr/bin/python /thrift/src/test/py/FastbinaryTest.py Testing TBinaryAccelerated Traceback (most recent call last): File "/thrift/src/test/py/FastbinaryTest.py", line 278, in do_test(TBinaryProtocolAccelerated, TBinaryProtocol) File "/thrift/src/test/py/FastbinaryTest.py", line 244, in do_test Test(fast, slow).do_test() File "/thrift/src/test/py/FastbinaryTest.py", line 198, in do_test self._check_write(hm) File "/thrift/src/test/py/FastbinaryTest.py", line 137, in _check_write o.write(prot_slow) File "/thrift/src/test/py/gen-py-default/DebugProtoTest/ttypes.py", line 637, in write iter52.write(oprot) File "/thrift/src/test/py/gen-py-default/DebugProtoTest/ttypes.py", line 371, in write oprot.writeString(self.zomg_unicode.encode('utf-8') if sys.version_info[0] == 2 else self.zomg_unicode) File "/thrift/src/lib/py/build/lib.linux-x86_64-2.7/thrift/protocol/TProtocol.py", line 123, in writeString self.writeBinary(str_to_binary(str_val)) File "/thrift/src/lib/py/build/lib.linux-x86_64-2.7/thrift/protocol/TBinaryProtocol.py", line 131, in writeBinary self.trans.write(str) File "/thrift/src/lib/py/build/lib.linux-x86_64-2.7/thrift/transport/TTransport.py", line 233, in write self._buffer.write(buf) UnicodeEncodeError: 'ascii' codec can't encode character u'\xd7' in position 0: ordinal not in range(128) *** FAILED *** LIBDIR: /thrift/src/lib/py/build/lib.linux-x86_64-2.7 PY_GEN: gen-py-default SCRIPT: FastbinaryTest.py Traceback (most recent call last): File "./RunClientServer.py", line 321, in sys.exit(main()) File "./RunClientServer.py", line 300, in main runScriptTest(options.libdir, options.gen_base, genpydir, script) File "./RunClientServer.py", line 101, in runScriptTest raise Exception("Script subprocess failed, retcode=%d, args: %s" % (ret, ' '.join(script_args))) Exception: Script subprocess failed, retcode=1, args: /usr/bin/python /thrift/src/test/py/FastbinaryTest.py FAIL: RunClientServer.py == 1 of 1 test failed == ``` > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus >Assignee: James E. King, III > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219201#comment-16219201 ] ASF GitHub Bot commented on THRIFT-4207: Github user jeking3 commented on the issue: https://github.com/apache/thrift/pull/1274 I'll pull the changes into my sandbox and run unit, cross, ubsan, and sca jobs. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219199#comment-16219199 ] ASF GitHub Bot commented on THRIFT-4207: Github user jeking3 commented on the issue: https://github.com/apache/thrift/pull/1274 Travis is experiencing an outage event w.r.t Docker Hub that started this morning. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219126#comment-16219126 ] ASF GitHub Bot commented on THRIFT-4207: Github user elprans commented on the issue: https://github.com/apache/thrift/pull/1274 Fixed, but travis seems to be unstable again. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16218796#comment-16218796 ] ASF GitHub Bot commented on THRIFT-4207: Github user jeking3 commented on the issue: https://github.com/apache/thrift/pull/1274 This had some errors and needs more work - please move it forward. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16179930#comment-16179930 ] ASF GitHub Bot commented on THRIFT-4207: Github user elprans commented on the issue: https://github.com/apache/thrift/pull/1274 Rebased. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16178070#comment-16178070 ] James E. King, III commented on THRIFT-4207: You didn't enable push rights for committers so I cannot refresh your pull request for you, so if you could do it I would appreciate it. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16175362#comment-16175362 ] ASF GitHub Bot commented on THRIFT-4207: Github user jeking3 commented on the issue: https://github.com/apache/thrift/pull/1274 Could you rebase on master and refresh the PR so we get a clean build, now that CI is stable again? Thanks. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4207) Accelerated version of TBinaryProtocol allows invalid input to string fields.
[ https://issues.apache.org/jira/browse/THRIFT-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16021439#comment-16021439 ] ASF GitHub Bot commented on THRIFT-4207: GitHub user elprans opened a pull request: https://github.com/apache/thrift/pull/1274 THRIFT-4207: Make sure Python Accelerated protocol does not allow invalid UTF-8 The accelerated version of Binary and Compact protocol fails to validate the input string for UTF-8 fields. You can merge this pull request into a Git repository by running: $ git pull https://github.com/elprans/thrift python-fastbinary-utf8-validation Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1274.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1274 commit e030430e90ec5d7dff1db8dd98f36b6171c9a866 Author: Elvis Pranskevichus Date: 2017-05-23T15:50:38Z THRIFT-4207: Make sure Python Accelerated protocol does not allow invalid UTF-8 in. The accelerated version of Binary and Compact protocol fails to validate the input string for UTF-8 fields. > Accelerated version of TBinaryProtocol allows invalid input to string fields. > - > > Key: THRIFT-4207 > URL: https://issues.apache.org/jira/browse/THRIFT-4207 > Project: Thrift > Issue Type: Bug > Components: Python - Library >Affects Versions: 0.10.0 >Reporter: Elvis Pranskevichus > Fix For: 0.11.0 > > > {{TBinaryProtocolAccelerated}} and {{TCompactProtocolAccelerated}} currently > accept arbitrary bytes as input to string fields even when {{py:utf8strings}} > is on. -- This message was sent by Atlassian JIRA (v6.3.15#6346)