Minor adjustments

This commit is contained in:
2025-12-29 01:59:12 -05:00
parent c4fb273f55
commit 31a89d20df
2 changed files with 8 additions and 4 deletions

View File

@ -159,7 +159,9 @@ function display.showIncoming(addressString, allowed, reason)
mon.setCursorPos(1, 6) mon.setCursorPos(1, 6)
mon.setBackgroundColor(colors.black) mon.setBackgroundColor(colors.black)
mon.write("Address:\n" .. addressString) mon.write("Address:")
mon.setCursorPos(1, 7)
mon.write(addressString)
end end
function display.showEntity(entityType, entityName, allowed) function display.showEntity(entityType, entityName, allowed)

View File

@ -146,7 +146,7 @@ local function HandleIncomingPasswordRequest(password)
utils.sendPasswordResponse(true) utils.sendPasswordResponse(true)
return true return true
else else
utils.log("Incorrect password received: " .. password) utils.log("Incorrect password received")
utils.sendPasswordResponse(false) utils.sendPasswordResponse(false)
return false return false
end end
@ -299,12 +299,14 @@ local function handleIncomingWormhole()
elseif (result == 3) then elseif (result == 3) then
-- Received a message -- Received a message
local message = state.lastReceivedMessage local message = state.lastReceivedMessage
utils.log("Received message: " .. message)
-- Check if it's a password attempt -- Check if it's a password attempt (don't log passwords in plaintext)
if message:sub(1, 14) == "IRIS_PASSWORD:" then if message:sub(1, 14) == "IRIS_PASSWORD:" then
utils.log("Received password attempt")
local password = message:sub(15) local password = message:sub(15)
HandleIncomingPasswordRequest(password) HandleIncomingPasswordRequest(password)
else
utils.log("Received message: " .. message)
end end
state.lastReceivedMessage = nil state.lastReceivedMessage = nil
else else