twilio-java
twilio-java copied to clipboard
Add more RequestValidator test cases
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
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.