cut key for 16 size
Some checks are pending
Build and Push Docker Image / build-and-push (push) Waiting to run
Some checks are pending
Build and Push Docker Image / build-and-push (push) Waiting to run
This commit is contained in:
parent
c446f337de
commit
306f2d5f12
1 changed files with 3 additions and 4 deletions
|
@ -14,10 +14,10 @@ export const verifyRequest = (
|
||||||
try {
|
try {
|
||||||
const decipher = new Ecb(
|
const decipher = new Ecb(
|
||||||
Aes,
|
Aes,
|
||||||
new TextEncoder().encode(
|
new TextEncoder().encode((
|
||||||
Deno.env.get("SERVER_SECRET_KEY") ||
|
Deno.env.get("SERVER_SECRET_KEY") ||
|
||||||
konfigStore.get("server.secret_key") as string,
|
konfigStore.get("server.secret_key") as string
|
||||||
),
|
).substring(0, 16)),
|
||||||
Padding.PKCS7,
|
Padding.PKCS7,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ export const verifyRequest = (
|
||||||
}
|
}
|
||||||
// only allow ID to live for 6 hours
|
// only allow ID to live for 6 hours
|
||||||
if ((timestampNow + 6 * 60 * 60) - parsedTimestampInt < 0) {
|
if ((timestampNow + 6 * 60 * 60) - parsedTimestampInt < 0) {
|
||||||
console.log("sup lol")
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
|
|
Loading…
Reference in a new issue