mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-06-03 19:30:22 +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[];
|
||||
|
||||
// Using a dot as separator since it's not used in Base64
|
||||
const SEPARATOR = ".";
|
||||
const SEPARATOR = "~";
|
||||
|
||||
// Unified crypto utilities for both frontend and backend
|
||||
async function generateKey(
|
||||
@ -121,7 +121,6 @@ export async function decrypt(
|
||||
const dec = new TextDecoder();
|
||||
return dec.decode(decrypted);
|
||||
} catch (error) {
|
||||
console.error("[Decryption Error]:", error);
|
||||
throw new Error("Failed to decrypt AWS credentials");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user