Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-15495

Don't leak underlying programming language errors in query responses

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.6.2, 5.0.0
    • 4.0.0, 4.5.0
    • query
    • Security Level: Public
    • None
    • Untriaged
    • Unknown
    • Query-Sprint-28-11-2016

    Description

      We shouldn't have programming language specific error messages in our query error statements. See the packet trace below:

      16:16:14.469180 IP 172.23.100.44.46602 > 172.23.100.55.8093: Flags [P.], seq 2474:2721, ack 9107, win 246, options [nop,nop,TS val 1008849598 ecr 343434980], length 247
      E..+.+@.@.}...d,..d7.
      ..)vX^?..A....-......
      <!...xf.POST /query/service HTTP/1.1
      Host: 172.23.100.55:8093
      Accept-Encoding: identity
      Content-Length: 93
      Content-Type: application/x-www-form-urlencoded
       
      args=%22%5B100_57%5D%22&max_parallelism=1&prepared=%22d2c8e8c1-4506-46f1-b93b-235201dd3927%22
      16:16:14.469526 IP 172.23.100.55.8093 > 172.23.100.44.46602: Flags [P.], seq 9107:9684, ack 2721, win 206, options [nop,nop,TS val 343434981 ecr 1008849598], length 577
      E..u..@.@.<h..d7..d,...
      ?..A)vYU...."......
      .xf.<!..HTTP/1.1 400 Bad Request
      Content-Length: 444
      Content-Type: application/json; version=0.8.1
      Date: Mon, 29 Jun 2015 23:16:14 GMT
       
      {
          "requestID": "f9d881ba-d795-42bd-973d-945b94111b71",
          "errors": [
              {
                  "code": 1040,
                  "msg": "Error processing args - cause: json: cannot unmarshal string into Go value of type []interface {}"
              }
          ],
          "status": "fatal",
          "metrics": {
              "elapsedTime": "84.765..s",
              "executionTime": "84.314..s",
              "resultCount": 0,
              "resultSize": 0,
              "errorCount": 1
          }
      }
      

      At minimum in this case we should say that there was an error parsing the json request. A even better response however would be to point to where the parsing error occurred.

      Note that to create this error I passed args="[100_57]" which is invalid json. It should have been args=["100_57"]

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Prerna.Manaktala Prerna Manaktala (Inactive)
              mikew Mike Wiederhold [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty