fixing invalid InvalidCharacterError web safe base64 encoding
This commit is contained in:
parent
306f2d5f12
commit
4ca76879c1
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ export const verifyRequest = (
|
|||
);
|
||||
|
||||
const encryptedData = new TextDecoder().decode(
|
||||
decipher.decrypt(decodeBase64(stringToCheck)),
|
||||
decipher.decrypt(decodeBase64(stringToCheck.replace(/-/g, "+").replace(/_/g, "/"))),
|
||||
);
|
||||
const [parsedTimestamp, parsedVideoId] = encryptedData.split("|");
|
||||
const parsedTimestampInt = parseInt(parsedTimestamp);
|
||||
|
|
Loading…
Reference in a new issue