Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-206

When a query contains a comparison between a string and a boolean, an Internal Server Error response is returned

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: PDB 1.5.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Example query to trigger this is `["=", "exported", "false"]`. (full session is below)

      I would expect in this case a 400 Bad Request to be generated.

      branan@pegasus:~$ curl -v -G -H "Accept: application/json" --data-urlencode 'query=["=", "exported", "false"]' http://localhost:8080/v2/resources/Package

      • About to connect() to localhost port 8080 (#0)
      • Trying 127.0.0.1... connected
      • Connected to localhost (127.0.0.1) port 8080 (#0)
        > GET /v2/resources/Package?query=%5B%22%3D%22%2C%20%22exported%22%2C%20%22false%22%5D HTTP/1.1
        > User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
        > Host: localhost:8080
        > Accept: application/json
        >
        < HTTP/1.1 500 Server Error
        < Date: Tue, 16 Apr 2013 21:33:32 GMT
        < Content-Length: 0
        < Connection: close
        < Server: Jetty(7.x.y-SNAPSHOT)
        <
      • Closing connection #0

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              redmine.exporter redmine.exporter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support