summaryrefslogtreecommitdiff
path: root/client-web/source/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source/protocol')
-rw-r--r--client-web/source/protocol/crypto.ts2
-rw-r--r--client-web/source/protocol/mod.ts2
2 files changed, 3 insertions, 1 deletions
diff --git a/client-web/source/protocol/crypto.ts b/client-web/source/protocol/crypto.ts
index 742f22c..fb34e8d 100644
--- a/client-web/source/protocol/crypto.ts
+++ b/client-web/source/protocol/crypto.ts
@@ -3,6 +3,8 @@ import { log } from "../logger.ts";
//! I am not a crypto expert at all! Please read carefully and report any issues to me.
export async function crypto_seeded_key(seed: string): Promise<CryptoKey> {
+ if (seed.length < 8) log({ scope: "crypto", warn: true }, "Room name is very short. e2ee is insecure!")
+
log("crypto", "importing seed…")
const seed_key = await window.crypto.subtle.importKey(
"raw",
diff --git a/client-web/source/protocol/mod.ts b/client-web/source/protocol/mod.ts
index 53cbb86..f976f23 100644
--- a/client-web/source/protocol/mod.ts
+++ b/client-web/source/protocol/mod.ts
@@ -41,7 +41,7 @@ export class SignalingConnection {
setInterval(() => this.send_control({ ping: null }), 30000) // stupid workaround for nginx disconnecting inactive connections
}
on_error() {
- log("error", "websocket error occurred!")
+ log({ scope: "ws", error: true }, "websocket error occurred!")
}
async on_message(data: string) {
const packet: ClientboundPacket = JSON.parse(data) // TODO dont crash if invalid