diff options
author | Jason A. Donenfeld | 2018-07-14 05:10:28 +0200 |
---|---|---|
committer | Jason A. Donenfeld | 2018-07-14 05:10:28 +0200 |
commit | c4d23d02ec5a26d09d389dcf7b8928ecd5798ccc (patch) | |
tree | 842e4126b7cc428e8ec31dab4a14b485c1cd78d9 | |
parent | auth-filter: do not write more than we've read (diff) | |
download | cgit-c4d23d02ec5a26d09d389dcf7b8928ecd5798ccc.tar.gz cgit-c4d23d02ec5a26d09d389dcf7b8928ecd5798ccc.zip |
auth-filters: do not crash on nil username
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | filters/gentoo-ldap-authentication.lua | 2 |
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") | |||
106 | 106 | ||
107 | function gentoo_ldap_user_groups(username, password) | 107 | function gentoo_ldap_user_groups(username, password) |
108 | -- Ensure the user is alphanumeric | 108 | -- Ensure the user is alphanumeric |
109 | if username:match("%W") then | 109 | if username == nil or username:match("%W") then |
110 | return nil | 110 | return nil |
111 | end | 111 | end |
112 | 112 | ||