From 93d7cf13e01d96d02af276772340a28f923407c1 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 1 Apr 2009 14:59:31 +0000 Subject: Error check for empty input. --- openssh-model.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openssh-model.lua') diff --git a/openssh-model.lua b/openssh-model.lua index 3b8718b..26bc816 100644 --- a/openssh-model.lua +++ b/openssh-model.lua @@ -193,11 +193,11 @@ end local function parseauthline(line) local retval = {} local words = format.string_to_table(line, "%s") - if string.match(words[1], "^ssh%-%ws%w$") then + if words[1] and string.match(words[1], "^ssh%-%ws%w$") then retval.perm = "" retval.key = words[2] retval.id = table.concat(words, " ", 3) - elseif string.match(words[2], "^ssh%-%ws%w$") then + elseif words[2] and string.match(words[2], "^ssh%-%ws%w$") then retval.perm = words[1] retval.key = words[3] retval.id = table.concat(words, " ", 4) -- cgit v1.2.3