Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3016

Ruby structs do not validate optional members

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9.2
    • None
    • Ruby - Compiler
    • None

    Description

      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,

      Attachments

        Activity

          People

            Unassigned Unassigned
            ahawkins Adam Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: