Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-14 06:10:28 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-14 06:10:28 +0300
commitc4d23d02ec5a26d09d389dcf7b8928ecd5798ccc (patch)
tree842e4126b7cc428e8ec31dab4a14b485c1cd78d9 /filters
parent93a2c3305190ca87cc1a6c98868c251ef67c3f37 (diff)
auth-filters: do not crash on nil username
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'filters')
-rw-r--r--filters/gentoo-ldap-authentication.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/filters/gentoo-ldap-authentication.lua b/filters/gentoo-ldap-authentication.lua
index c1e382f..3b6564b 100644
--- a/filters/gentoo-ldap-authentication.lua
+++ b/filters/gentoo-ldap-authentication.lua
@@ -106,7 +106,7 @@ local lualdap = require("lualdap")
function gentoo_ldap_user_groups(username, password)
-- Ensure the user is alphanumeric
- if username:match("%W") then
+ if username == nil or username:match("%W") then
return nil
end