Adam Hawkins created THRIFT-3016:
------------------------------------

             Summary: Ruby structs do not validate optional members
                 Key: THRIFT-3016
                 URL: https://issues.apache.org/jira/browse/THRIFT-3016
             Project: Thrift
          Issue Type: Bug
          Components: Ruby - Compiler
    Affects Versions: 0.9.2
            Reporter: Adam Hawkins


The ruby library's {{Thrift::Struct#validate}} method does not check optional 
members. This is a vital method because it determines if a message should be 
sent to a client. Consider a protocol with a struct used as a response message. 
That struct contains an optional struct {{foo}} with optional member {{a}} & 
required member {{b}}. If {{foo}} is set to a struct without {{a}} that is 
fine. If {{foo}} is set to a struct without {{b}} validate succeeds and an bad 
message is sent to a client. The client receives the a 
{{Thrift::TransportException}} instead of a {{Thrift::ProtocolException}},



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to