remove search parameters from generated URLs since we dont use any
This commit is contained in:
@@ -37,6 +37,7 @@ async function generateUrl(): Promise<URL> {
|
|||||||
// Generate URL with public key as the 'p' search parameter
|
// Generate URL with public key as the 'p' search parameter
|
||||||
const ecdhPublicJwk = await window.crypto.subtle.exportKey("jwk", ecdhPublic);
|
const ecdhPublicJwk = await window.crypto.subtle.exportKey("jwk", ecdhPublic);
|
||||||
const url = new URL(window.location.toString());
|
const url = new URL(window.location.toString());
|
||||||
|
url.search = "";
|
||||||
url.hash = `p=${btoa(JSON.stringify(ecdhPublicJwk))}`;
|
url.hash = `p=${btoa(JSON.stringify(ecdhPublicJwk))}`;
|
||||||
|
|
||||||
// Return the generated URL
|
// Return the generated URL
|
||||||
|
@@ -96,7 +96,7 @@ async function encryptData(event: Event) {
|
|||||||
keyPairB.publicKey
|
keyPairB.publicKey
|
||||||
);
|
);
|
||||||
const url = new URL(window.location.toString());
|
const url = new URL(window.location.toString());
|
||||||
|
url.search = "";
|
||||||
url.hash = `p=${encodeURIComponent(
|
url.hash = `p=${encodeURIComponent(
|
||||||
btoa(JSON.stringify(ecdhPublicJwk))
|
btoa(JSON.stringify(ecdhPublicJwk))
|
||||||
)}&iv=${encodeURIComponent(
|
)}&iv=${encodeURIComponent(
|
||||||
|
Reference in New Issue
Block a user