summaryrefslogtreecommitdiffstats
path: root/lib/authenticator-plaintext.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-05-05 14:41:54 +0000
committerTed Trask <ttrask01@yahoo.com>2008-05-05 14:41:54 +0000
commit76a118d4fe2f180badaff69dac8c6c46df991663 (patch)
tree3082be685448011e47c37d21aa5f8a1865c5164e /lib/authenticator-plaintext.lua
parent3eecd1d2d435332a27e1712cdb352391ffaa0b9d (diff)
downloadacf-core-76a118d4fe2f180badaff69dac8c6c46df991663.tar.bz2
acf-core-76a118d4fe2f180badaff69dac8c6c46df991663.tar.xz
Finished user and role management
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1100 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/authenticator-plaintext.lua')
-rw-r--r--lib/authenticator-plaintext.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/authenticator-plaintext.lua b/lib/authenticator-plaintext.lua
index 6c4cbbd..613eaab 100644
--- a/lib/authenticator-plaintext.lua
+++ b/lib/authenticator-plaintext.lua
@@ -88,6 +88,8 @@ local validate_settings = function (self, userid, username, password, password_c
-- Set errormessages when entering invalid values
if (#userid == 0) then errormessage.userid = "You need to enter a valid userid!" end
+ if string.find(userid, "[^%w_]") then errormessage.userid = "Userid can only contain letters, numbers, and '_'" end
+ if string.find(username, "%p") then errormessage.username = "Real name cannot contain punctuation" end
if password then
if (#password == 0) then
errormessage.password = "Password cannot be blank!"