According to https://www.twilio.com/docs/api/security#notes the port number should be omitted in HTTPS requests for signature validation. RequestValidator.validate should take these rules into account and not require the user to strip out the number.
My current workaround is to parse and reencode the URL as follows, but this should happen within the validate() method:
parsed = urlparse.urlparse(uri)
if parsed.scheme == 'https':
parsed = parsed._replace(netloc=parsed.netloc.split(':')[0])
uri = parsed.geturl()
According to https://www.twilio.com/docs/api/security#notes the port number should be omitted in HTTPS requests for signature validation.
RequestValidator.validate
should take these rules into account and not require the user to strip out the number.My current workaround is to parse and reencode the URL as follows, but this should happen within the
validate()
method:Internal ticket: https://www.twilio.com/console/support/tickets/1061656