remove search parameters from generated URLs since we dont use any

This commit is contained in:
Silas 2024-01-29 23:30:12 -05:00
parent 5cd3e3f990
commit dc4935404c
Signed by: silentsilas
GPG Key ID: 4199EFB7DAA34349
2 changed files with 2 additions and 1 deletions

View File

@ -37,6 +37,7 @@ async function generateUrl(): Promise<URL> {
// Generate URL with public key as the 'p' search parameter
const ecdhPublicJwk = await window.crypto.subtle.exportKey("jwk", ecdhPublic);
const url = new URL(window.location.toString());
url.search = "";
url.hash = `p=${btoa(JSON.stringify(ecdhPublicJwk))}`;
// Return the generated URL

View File

@ -96,7 +96,7 @@ async function encryptData(event: Event) {
keyPairB.publicKey
);
const url = new URL(window.location.toString());
url.search = "";
url.hash = `p=${encodeURIComponent(
btoa(JSON.stringify(ecdhPublicJwk))
)}&iv=${encodeURIComponent(