From c4d23d02ec5a26d09d389dcf7b8928ecd5798ccc Mon Sep 17 00:00:00 2001 From: Jason A. Donenfeld Date: Sat, 14 Jul 2018 05:10:28 +0200 Subject: auth-filters: do not crash on nil username Signed-off-by: Jason A. Donenfeld --- filters/gentoo-ldap-authentication.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filters') 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 -- cgit v1.2.3-2-gb3c3