Voice-call: fix Twilio signature ordering
This commit is contained in:
@@ -25,7 +25,7 @@ export function validateTwilioSignature(
|
|||||||
|
|
||||||
// Sort params alphabetically and append key+value
|
// Sort params alphabetically and append key+value
|
||||||
const sortedParams = Array.from(params.entries()).sort((a, b) =>
|
const sortedParams = Array.from(params.entries()).sort((a, b) =>
|
||||||
a[0].localeCompare(b[0]),
|
a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const [key, value] of sortedParams) {
|
for (const [key, value] of sortedParams) {
|
||||||
|
|||||||
Reference in New Issue
Block a user