mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-06-06 21:00:21 +09:00
Enhance encryption security with additional safeguards.
This commit is contained in:
parent
12d38aa4b2
commit
19437c7aa1
@ -10,7 +10,7 @@ type ParsedEvent = Record<string, any>;
|
|||||||
type EventResult = ParsedEvent[];
|
type EventResult = ParsedEvent[];
|
||||||
|
|
||||||
// Using a dot as separator since it's not used in Base64
|
// Using a dot as separator since it's not used in Base64
|
||||||
const SEPARATOR = ".";
|
const SEPARATOR = "~";
|
||||||
|
|
||||||
// Unified crypto utilities for both frontend and backend
|
// Unified crypto utilities for both frontend and backend
|
||||||
async function generateKey(
|
async function generateKey(
|
||||||
@ -121,7 +121,6 @@ export async function decrypt(
|
|||||||
const dec = new TextDecoder();
|
const dec = new TextDecoder();
|
||||||
return dec.decode(decrypted);
|
return dec.decode(decrypted);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("[Decryption Error]:", error);
|
|
||||||
throw new Error("Failed to decrypt AWS credentials");
|
throw new Error("Failed to decrypt AWS credentials");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user