diff options
Diffstat (limited to 'lib/authenticator-plaintext.lua')
-rw-r--r-- | lib/authenticator-plaintext.lua | 2 |
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!" |