Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
URLsafe encoding needs to happen outside of btoa
  • Loading branch information
Regalijan authored and Regalijan committed Oct 24, 2023
1 parent d87d801 commit 4559349
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions functions/api/me/items/[type]/[id].ts
Expand Up @@ -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("=", "")}`,
);
}

Expand Down

0 comments on commit 4559349

Please sign in to comment.