[
https://issues.apache.org/jira/browse/THRIFT-4018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15793399#comment-15793399
]
ASF GitHub Bot commented on THRIFT-4018:
----------------------------------------
GitHub user dbravender opened a pull request:
https://github.com/apache/thrift/pull/1148
THRIFT-4018 corruption after ApplicationException in Ruby server
This fixes an issue where a Ruby Thrift server can corrupt connections by
putting ApplicationException in the middle of a response. See
https://issues.apache.org/jira/browse/THRIFT-4018 for more information.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dbravender/thrift
defect/THRIFT-4018-corruption-after-ApplicationException
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1148.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 #1148
----
commit d1e3ef2c600913c17e8503d792f35604105849d0
Author: Dan Bravender <[email protected]>
Date: 2016-12-20T14:57:56Z
THRIFT-4018 reproduction test case
commit aac7b6cedd3bf1711d3bfaa657d0e137d252508b
Author: Dan Bravender <[email protected]>
Date: 2017-01-02T19:40:11Z
THRIFT-4018 validate response before putting it on the wire
Client: ruby
Fixes an issue where an invalid response could corrupt all future responses
----
> Ruby server can corrupt connections by putting ApplicationException in the
> middle of a response
> -----------------------------------------------------------------------------------------------
>
> Key: THRIFT-4018
> URL: https://issues.apache.org/jira/browse/THRIFT-4018
> Project: Thrift
> Issue Type: Bug
> Components: Ruby - Library
> Affects Versions: 0.9.3
> Reporter: Dan Bravender
>
> # Have a client make a call to a thrift server method that returns an invalid
> value for an enum
> # Have the client make another call to the same method that returns an
> invalid value for an enum
> *Expected*: Thrift server responds with an ApplicationException for both calls
> *Actual*: The thrift server responds with ApplicationException for the first
> call but then further calls can't be parsed by the client because there is
> unexpected data that the client cannot parse
> I discovered this while writing a test case for THRIFT-3781 though it is the
> opposite problem.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)