Skip to content

Commit

Permalink
feature: Adds (semi-broken) public key authentication.
Browse files Browse the repository at this point in the history
  • Loading branch information
imterah committed May 10, 2024
1 parent 5e0c7af commit 19aadc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 19aadc2

Please sign in to comment.