summaryrefslogtreecommitdiffstats
path: root/fetchmail-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-06-12 14:00:55 +0000
committerTed Trask <ttrask01@yahoo.com>2009-06-12 14:00:55 +0000
commitf76355c4abe55be89c91061533d01e689325c51f (patch)
treeac54ff6a053b67213be497ed63134bf47a34e887 /fetchmail-model.lua
parent044eceee869f9b070f13a83929b7f5205e66cb05 (diff)
downloadacf-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.lua10
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