From 19aadc20c00674fccd8896b499c1f8b0ce6b75cb Mon Sep 17 00:00:00 2001 From: greysoh Date: Thu, 9 May 2024 19:39:16 -0400 Subject: [PATCH] feature: Adds (semi-broken) public key authentication. --- lom/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lom/src/index.ts b/lom/src/index.ts index 72c2993..c1ba266 100644 --- a/lom/src/index.ts +++ b/lom/src/index.ts @@ -111,8 +111,8 @@ server.on("connection", client => { if ( rawKey.username == auth.username && auth.key.algo == key.type && - checkValue(auth.key.data, key.getPublicSSH()) || - (auth.signature && key.verify(auth.blob as Buffer, auth.signature, auth.key.algo)) + auth.key.data == key.getPublicSSH() && + auth.signature && key.verify(auth.blob as Buffer, auth.signature, auth.key.algo) ) { console.log(" -- VERIFIED PUBLIC KEY --"); userData.username = rawKey.username;