4494: Cannot send non-ascii characters in a webhook with custom payload or XML payload.


What version are you running?


What's the URL of the page containing the problem?

The detail page of a review, after doing an action that triggers a webhook with XML payload or with custom payload that includes non-ASCII data.

What steps will reproduce the problem?

  1. Create a webhook with XML payload, sent on review request publications.
  2. Create a webhook with JSON custom payload, with custom payload {"summary": "{{review_request.summary}}"}, sent on review request publications.
  3. Create and publish a review with non-ASCII characters in the summary.
  4. See a dialog box popping with text "500 Internal Server Error"
  5. Check the reviewboard logs and see that exceptions were logged for the created webhooks, with detail text saying that the 'ascii' codec could not encode the characters as they were not in range(128).

What is the expected output? What do you see instead?

There should not be any error in sending the payloads to the target URLs.

What operating system are you using? What browser?

Using a Windows client on Chrome, against a Linux server with Python 2.7.x

Please provide any additional information below.

No issue occurs with either Form-Data or JSON payload webhooks, because in these cases non-ASCII characters are escaped as \uxxxx sequences.

#1 david
  • +EasyFix
#2 david

Fixed in release-2.5.x (975b8e5). This will ship in 2.5.8. Thanks!

  • -New