auth-filters: do not crash on nil username

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-07-14 05:10:28 +02:00
orang tua 93a2c33051
melakukan c4d23d02ec

Melihat File

@ -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