APIs & Integrations

arickp1
Participant | Elite Partner
Participant | Elite Partner

X-HubSpot-Signature validation fails when request has certain Unicode characters

This is for a workflow extension that I've written. The workflow extension takes form submission values via contact tokens in the workflow settings, and passes them to a webhook I've made, which relays those form submission values to another system.

 

I'm noticing in my application logs that my value of the X-HubSpot-Signature isn't matching the one in the request headers when the request contains a certain Unicode character. It's some "line separator character" (I'm guessing this is from customers copy/pasting from Microsoft Word into a HubSpot form)

 

Other Unicode characters work; I tested the signature validation when the body contained Korean text, and that worked fine.

 

Here's a sample request body that would cause me compute a mismatching signature:

 

 

 

{"callbackId":"ap-7084102-215042484774-1-0","origin":{"portalId":7084102,"actionDefinitionId":1970,"actionDefinitionVersion":5,"extensionDefinitionId":1970,"extensionDefinitionVersionId":5},"context":{"source":"WORKFLOWS","workflowId":36738539},"object":{"objectId":58401,"objectType":"CONTACT"},"fields":{"ticket_type":"task","subject":"Unicode body","due_date":"12","comment":"Hello\u2028\nThank you,","priority":"low","type":"30","tags_space_delimited":"test hubspot zendesk","status":"open"},"inputFields":{"ticket_type":"task","subject":"Unicode body","due_date":"12","comment":"Hello\u2028\nThank you,","priority":"low","type":"30","tags_space_delimited":"test hubspot zendesk","status":"open"}}

 

 

The character appears right before "Thank you". If I do another request that doesn't contain this \u2028 character then my signature checks out.

0 Upvotes
dennisedson
Community Manager
Community Manager

X-HubSpot-Signature validation fails when request has certain Unicode characters

@PJagdale! 👋  Long time no chat!

Have you run into this before

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes