Skip to content

Commit 528fc25

Browse files
authored
fix: X-Twilio-Signature validation when URL query parameters contain @ or : (#621)
1 parent 90f4c46 commit 528fc25

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/webhooks/webhooks.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ function validateExpressRequest(request, authToken, opts) {
163163
});
164164
if (request.originalUrl.search(/\?/) >= 0) {
165165
webhookUrl = webhookUrl.replace(/%3F/g, '?');
166+
webhookUrl = webhookUrl.replace(/%3A/g, ':');
167+
webhookUrl = webhookUrl.replace(/%40/g, '@');
166168
}
167169

168170
}

0 commit comments

Comments
 (0)