summaryrefslogtreecommitdiff
path: root/client-web/source/protocol
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-09-09 14:08:20 +0200
committermetamuffin <metamuffin@disroot.org>2022-09-09 14:08:20 +0200
commitd101fb7f77822aac2a3d42ca1529028405cfad0d (patch)
treea1603a025a06ef1efa30828d4a669684095ef50b /client-web/source/protocol
parente8ba73eaef223513b143323df6cc7f495838a6ab (diff)
downloadkeks-meet-d101fb7f77822aac2a3d42ca1529028405cfad0d.tar
keks-meet-d101fb7f77822aac2a3d42ca1529028405cfad0d.tar.bz2
keks-meet-d101fb7f77822aac2a3d42ca1529028405cfad0d.tar.zst
refactor ui layout
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