Commit f76355c4 authored by Ted Trask's avatar Ted Trask

Fixed bug in validation caused by Lua special characters.

parent 044eceee
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment