-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] validateRequest()
is not working when a query param includes a single quote ('
)
#1059
Comments
Hello, The change here has the exact same functionality while encoding and don't feel like is causing this issue.
In built URL
|
Can you elaborate further what is the use case here which is causing problem for you? |
@manisha1997 I'm a bit confused about the role of Use Case:I’m trying to use the The Scenario That Fails:
What Seems to Be Happening:It looks like the single quote ( |
…query string values fixes twilio#1059
…query string values fixes twilio#1059
…query string values fixes twilio#1059
…query string values fixes twilio#1059
…query string values fixes twilio#1059
We found the issue and working on a fix |
…query string values fixes twilio#1059
@manisha1997 You can take also a look at what I did in 😃 #1061 |
sure, I am taking a look at that too |
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: