From 9e06241ac36dd5d0429bcf5161c4bcbc25198b4c Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sun, 22 Mar 2026 11:20:57 -0400 Subject: [PATCH] Refactor trustConnection function to use getTrustKey instead of getPassword for improved security --- sys/apps/network/trust.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/apps/network/trust.lua b/sys/apps/network/trust.lua index 4b12559..fde066f 100644 --- a/sys/apps/network/trust.lua +++ b/sys/apps/network/trust.lua @@ -25,11 +25,11 @@ end local function trustConnection(socket) local data = socket:read(2) if data then - local password = Security.getPassword() - if not password then + local trustKey = Security.getTrustKey() + if not trustKey then socket:write({ msg = 'No password has been set' }) else - if validateData(data, password, socket.dhost) then + if validateData(data, trustKey, socket.dhost) then print("Accepted trust from " .. socket.dhost) socket:write({ success = true, msg = 'Trust accepted' }) return