diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-06-12 14:00:55 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-06-12 14:00:55 +0000 |
commit | f76355c4abe55be89c91061533d01e689325c51f (patch) | |
tree | ac54ff6a053b67213be497ed63134bf47a34e887 /fetchmail-model.lua | |
parent | 044eceee869f9b070f13a83929b7f5205e66cb05 (diff) | |
download | acf-fetchmail-f76355c4abe55be89c91061533d01e689325c51f.tar.bz2 acf-fetchmail-f76355c4abe55be89c91061533d01e689325c51f.tar.xz |
Fixed bug in validation caused by Lua special characters.
Diffstat (limited to 'fetchmail-model.lua')
-rw-r--r-- | fetchmail-model.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fetchmail-model.lua b/fetchmail-model.lua index 9dde434..bb74348 100644 --- a/fetchmail-model.lua +++ b/fetchmail-model.lua @@ -301,11 +301,11 @@ local function validateentry(entry) success = modelfunctions.validateselect(entry.value.method) and success success = modelfunctions.validateselect(entry.value.envelope) and success - if string.find(entry.value.remotehost.value, "[^%w.-]") then + if string.find(entry.value.remotehost.value, "[^%w%.%-]") then entry.value.remotehost.errtxt = "Invalid entry - may only contain alphanumeric, '.', or '-'" success = false end - if string.find(entry.value.remotemailbox.value, "[^%w.-_@]") then + if string.find(entry.value.remotemailbox.value, "[^%w%.%-_@]") then entry.value.remotemailbox.errtxt = "Invalid entry" success = false end @@ -313,15 +313,15 @@ local function validateentry(entry) entry.value.remotepassword.errtxt = "Invalid entry - cannot contain whitespace" success = false end - if string.find(entry.value.localhost.value, "[^%w.-]") then + if string.find(entry.value.localhost.value, "[^%w%.%-]") then entry.value.localhost.errtxt = "Invalid entry - may only contain alphanumeric, '.', or '-'" success = false end - if string.find(entry.value.localmailbox.value, "[^%w.-_@]") then + if string.find(entry.value.localmailbox.value, "[^%w%.%-_@]") then entry.value.localmailbox.errtxt = "Invalid entry" success = false end - if string.find(entry.value.localdomain.value, "[^%w.-]") then + if string.find(entry.value.localdomain.value, "[^%w%.%-]") then entry.value.localdomain.errtxt = "Invalid entry - may only contain alphanumeric, '.', or '-'" success = false end |