From 4559349ac67d0b8be0a93d8e6513fa02e1f076c0 Mon Sep 17 00:00:00 2001 From: Regalijan <72576136+Regalijan@users.noreply.github.com> Date: Mon, 23 Oct 2023 20:20:44 -0400 Subject: [PATCH] URLsafe encoding needs to happen outside of btoa --- functions/api/me/items/[type]/[id].ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/functions/api/me/items/[type]/[id].ts b/functions/api/me/items/[type]/[id].ts index c8acb93..cbb8fc6 100644 --- a/functions/api/me/items/[type]/[id].ts +++ b/functions/api/me/items/[type]/[id].ts @@ -52,11 +52,11 @@ export async function onRequestGet(context: RequestContext) { `https://mediaproxy.carcrushers.cc/${ data.attachments[i] }?Expires=${exp}&KeyName=portal-media-linkgen&Signature=${btoa( - String.fromCharCode(...new Uint8Array(signatures[i])) - .replaceAll("+", "-") - .replaceAll("/", "_") - .replaceAll("=", ""), - )}`, + String.fromCharCode(...new Uint8Array(signatures[i])), + ) + .replaceAll("+", "-") + .replaceAll("/", "_") + .replaceAll("=", "")}`, ); }