]> git.cameronkatri.com Git - cgit.git/commitdiff
auth-filters: do not crash on nil username
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 14 Jul 2018 03:10:28 +0000 (05:10 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 14 Jul 2018 03:10:28 +0000 (05:10 +0200)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
filters/gentoo-ldap-authentication.lua

index c1e382fecbe3e9df5d6a25736b6a9f68358c4a54..3b6564b42983fc6996583495667ca2d8d93a99a0 100644 (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