Skip to content
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

Add more RequestValidator test cases #645

Open
aSemy opened this issue Sep 19, 2021 · 2 comments
Open

Add more RequestValidator test cases #645

aSemy opened this issue Sep 19, 2021 · 2 comments
Labels
type: docs update documentation change not affecting the code

Comments

@aSemy
Copy link

aSemy commented Sep 19, 2021

Issue Summary

RequestValidator only has one example in its test, RequestValidatorTest.

I'm attempting to use RequestValidator but it's not working - it says all requests that come from Twilio are invalid. As there's only one example that makes it very difficult to diagnose what the problem is. It would help massively to have more examples.

As RequestValidator is part of security, good test coverage is really important, especially edge cases.

Here's a starting list of the test cases to be added

  • A request with and without form parameters
  • A request with and without query parameters
  • A request with and without non-Twilio query parameters (e.g. I set a Voice Callback URL to be https://my-website.abc/twilio/callback/?type=thiswontbeusedinthesignaturegeneratorandsoshouldbeignored
  • A request with URL encoded query parameters

And just a lot more tests in general. At the moment the RequestValidator is unusable.

Technical details:

  • twilio-java version: 8.19.1
  • java version: 11
@shwetha-manvinkurke shwetha-manvinkurke added the type: docs update documentation change not affecting the code label Sep 20, 2021
@shwetha-manvinkurke
Copy link
Contributor

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

@gpwink
Copy link

gpwink commented Aug 28, 2024

Besides the fact that the code will not validate a Twilio request anymore. I'd like to know exactly what to add in the parameters map as it simply won't work for a Status Webhook at the moment. There seems to be extra information needed and nothing available in the official doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs update documentation change not affecting the code
Projects
None yet
Development

No branches or pull requests

3 participants