Best answer

Parentheses (round brackets) in webhook data are corrupting request data

  • 23 December 2021
  • 6 replies
  • 260 views

Hello, recently we spotted this bug - when using parentheses (round brackets) in webhook data fields - they’re are corrupting request data:


Request preview shows it normally:
 


But the actual data sent to the server is corrupted:
 

 

Server responds with json_encode( $_POST ) no other processing is made.

It gets worse with array form keys:

 

Preview also looks fine:


But the whole value string is replaced with substring from parentheses:

 

And with JSON payload type:


Request looks completely weird:


We know we can escape all brackets manually via code step (similar to this issue), but since preview shows data correctly and only the actual request is corrupted we believe it might be some bug in webhook module.

After some testing we found it’s yyy(zzz) pattern that causes issues. It’s not breaking stuff if we add space yyy (zzz) or if we remove one bracket.

Thanks!

icon

Best answer by SamB 23 February 2022, 14:09

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 7
Badge +14

Hi @AgentFire 

Check out this article for context on how Zapier handles “Named Variables”:

 

Hi @AgentFire 

Check out this article for context on how Zapier handles “Named Variables”:

 

Good to know, thanks! So apparently this feature breaks webhook data. And if you look closely at screenshots, you’ll see it’s not just extracting named variables, but creating a complete mess in data, destroying data fields, or with JSON payload - it moves whole data inside results object, which was not even there initially :scream:.
At first it was triggered by this word: Day(s) (and may be triggered by any other user input).
So it looks reasonable to name it a bug - even if I would like to put named variables there - it will destroy data fields anyway.. or need to at least optionally disable Named Variables feature, just like Unflatten feature:

btw Day(s) is not even matching the camelCase pattern for methods/variables :relaxed:

Userlevel 7
Badge +14

@AgentFire 

Probably best to open a ticket with Zapier Support for further assistance with this: https://zapier.com/app/get-help

@AgentFire

Probably best to open a ticket with Zapier Support for further assistance with this: https://zapier.com/app/get-help

Will do that, thanks! Will also post link to this thread, if you don’t mind (don’t delete it pls for now :smiley: ).

Userlevel 7
Badge +9

Interesting, thanks so much for reaching out, @AgentFire! I can see you opened up a ticket with our support team which is perfect! Thanks so much for your patience while the team digs into this for you. 🙂

Userlevel 7
Badge +11

Hey all! I just wanted to follow up here as spotted that our Support team added @AgentFire to a bug report for this issue.

I can’t make any promises as to when this will be sorted by but we’ll be sure to email and will post an update here as soon as it is.