Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-1755

Avoid decoding msgpack request body as UTF-8

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: SERVER 5.1.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Platform Core
    • Story Points:
      1
    • Sprint:
      Platform Core 2017-08-08
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      When the puppet agent is set to send data in Msgpack format, previously the server wouldn't handle it correctly, because it tried to interpret the binary data as UTF-8. We now have a special case for msgpack data, so it is passed along as binary, just as it came in.
      Show
      When the puppet agent is set to send data in Msgpack format, previously the server wouldn't handle it correctly, because it tried to interpret the binary data as UTF-8. We now have a special case for msgpack data, so it is passed along as binary, just as it came in.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      Covered by spec tests

      Description

      Currently, if a request body with a Content-Type of "application/x-msgpack" is sent into Puppet Server, it will inappropriately be decoded into a string as UTF-8. Instead, like is done for application/octet-stream, the raw bytes of the request body should be passed on through the indirector in Ruby Puppet, without any preliminary decoding.

      The production code change for this ticket may just involve changing this line to:

      (nil "" "application/octet-stream" "application/x-msgpack") body
      

      Along with this change, some sort of automated "integration" test should be written to validate that the msgpack payload is preserved / handled correctly through the request pipeline.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  jeremy.barlow Jeremy Barlow
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: