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

RequestValidator #522

Closed
chriswelles opened this issue May 23, 2020 · 1 comment · Fixed by #567
Closed

RequestValidator #522

chriswelles opened this issue May 23, 2020 · 1 comment · Fixed by #567
Labels
type: bug bug in the library

Comments

@chriswelles
Copy link

Issue Summary

requestValidator.Validate doesn't work when the hostname in the URL has any uppercase letters. The change introduced with #492 breaks things.

The change introduces the use of URIBuilder to add and remove the port from the URL. Unfortunately, that technique also lowercases the hostname. The actual signature in the payload is against the hostname in the originally specified case, so signature validation fails if the hostname has any uppercase letters.

Steps to Reproduce

Validate a request using a callback URL with any uppercase letters in the hostname.

Code Snippet

	var uri = new UriBuilder("http://MixedCaseUrl/");
	uri.Port = -1;
	string result = uri.ToString();
	// result is "http://mixedcaseurl".
	// It's been lowercased.

Technical details:

  • twilio-csharp version: 5.38.0
  • csharp version: .NET Core 3.1
@eshanholtz
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug bug in the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants