You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setup a call with a redirect URI that has a query param with a quote in it
When the call is redirected to the server, the validation does not pass
This will also happen if ToState, FromState, or any other query param automatically added by Twilio includes a quote, and the server returns a 307 - Temporary Redirect to a different URL, for example Forli' or Trezzo Sull'Adda
Our use case
A caller starts a call to the state Trezzo Sull'Adda
The caller hangs up
We receive the hang-up command via POST and respond with 307 - Temporary Redirect to Location: https://api.example.com
api.example.com receives the redirect with GET method and body as query param instead
validateRequest() now fails because of the single quote
Issue Summary
The
validateRequest()
function is not working properly when a query param value includes a single quote ('
) (and probably more special characters)This bug seems to be introduced after this commit 18c6d6f
Why?
The quote gets escaped when using
new URL()
, and the Twilio sever seems to generate the signature with an unescaped quoteSteps to Reproduce
ToState
,FromState
, or any other query param automatically added by Twilio includes a quote, and the server returns a307 - Temporary Redirect
to a different URL, for exampleForli'
orTrezzo Sull'Adda
Our use case
Trezzo Sull'Adda
POST
and respond with307 - Temporary Redirect
toLocation: https://api.example.com
api.example.com
receives the redirect withGET
method and body as query param insteadvalidateRequest()
now fails because of the single quoteCode Snippet
Exception/Log
false
Technical details:
5.4.0
v22.11.0
The text was updated successfully, but these errors were encountered: