Skip to content

Add more RequestValidator test cases #645

@aSemy

Description

@aSemy

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

Metadata

Metadata

Assignees

Labels

TwiDi-InReviewSolution is under reviewtype: docs updatedocumentation change not affecting the code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions