feat(security): switch master key to non-extractable CryptoKey handle and remove direct access
This commit is contained in:
11
dist/app.js
vendored
11
dist/app.js
vendored
@@ -2266,7 +2266,6 @@ var EnhancedSecureP2PChat = () => {
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
}
|
||||
console.log("Processing single QR code:", scannedData.substring(0, 50) + "...");
|
||||
let parsedData;
|
||||
if (typeof window.decodeAnyPayload === "function") {
|
||||
const any = window.decodeAnyPayload(scannedData);
|
||||
@@ -2568,24 +2567,14 @@ var EnhancedSecureP2PChat = () => {
|
||||
}]);
|
||||
let offer;
|
||||
try {
|
||||
console.log("DEBUG: Processing offer input:", offerInput.trim().substring(0, 100) + "...");
|
||||
console.log("DEBUG: decodeAnyPayload available:", typeof window.decodeAnyPayload === "function");
|
||||
console.log("DEBUG: decompressIfNeeded available:", typeof window.decompressIfNeeded === "function");
|
||||
if (typeof window.decodeAnyPayload === "function") {
|
||||
console.log("DEBUG: Using decodeAnyPayload...");
|
||||
const any = window.decodeAnyPayload(offerInput.trim());
|
||||
console.log("DEBUG: decodeAnyPayload result type:", typeof any);
|
||||
console.log("DEBUG: decodeAnyPayload result:", any);
|
||||
offer = typeof any === "string" ? JSON.parse(any) : any;
|
||||
} else {
|
||||
console.log("DEBUG: Using decompressIfNeeded...");
|
||||
const rawText = typeof window.decompressIfNeeded === "function" ? window.decompressIfNeeded(offerInput.trim()) : offerInput.trim();
|
||||
console.log("DEBUG: decompressIfNeeded result:", rawText.substring(0, 100) + "...");
|
||||
offer = JSON.parse(rawText);
|
||||
}
|
||||
console.log("DEBUG: Final offer:", offer);
|
||||
} catch (parseError) {
|
||||
console.error("DEBUG: Parse error:", parseError);
|
||||
throw new Error(`Invalid invitation format: ${parseError.message}`);
|
||||
}
|
||||
if (!offer || typeof offer !== "object") {
|
||||
|
||||
Reference in New Issue
Block a user