diff --git a/display.lua b/display.lua index 4201e78..452f5ce 100644 --- a/display.lua +++ b/display.lua @@ -159,7 +159,9 @@ function display.showIncoming(addressString, allowed, reason) mon.setCursorPos(1, 6) mon.setBackgroundColor(colors.black) - mon.write("Address:\n" .. addressString) + mon.write("Address:") + mon.setCursorPos(1, 7) + mon.write(addressString) end function display.showEntity(entityType, entityName, allowed) diff --git a/startup.lua b/startup.lua index 23727dc..64a6467 100644 --- a/startup.lua +++ b/startup.lua @@ -146,7 +146,7 @@ local function HandleIncomingPasswordRequest(password) utils.sendPasswordResponse(true) return true else - utils.log("Incorrect password received: " .. password) + utils.log("Incorrect password received") utils.sendPasswordResponse(false) return false end @@ -299,12 +299,14 @@ local function handleIncomingWormhole() elseif (result == 3) then -- Received a message 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 + utils.log("Received password attempt") local password = message:sub(15) HandleIncomingPasswordRequest(password) + else + utils.log("Received message: " .. message) end state.lastReceivedMessage = nil else