Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-14371

Invoking webhook with null character response causes PostgreSQL error

    XMLWordPrintable

Details

    Description

      Issue Summary

      When a webhook endpoint responds with a null character in the response body, an invalid byte sequence error for encoding "UTF8" in PostgreSQL occurs while flushing the invocation details into the database in Bitbucket.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Set up a webhook endpoint that responds with a null character in the response body.
      2. Add a new webook in Bitbucket using the endpoint from the previous step.
      3. Invoke the webhook and observe the error when the system attempts to flush the invocation details into the database.

      Expected Results

      The system should handle the webhook responses without throwing errors, even if they contain null characters.

      Actual Results

      The system throws an invalid byte sequence error when a webhook response includes a null character.

      org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              3314e5447912 Ben Longhurst
              74d6667aa35c Josh Aguilar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: