about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-14 05:10:28 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-14 05:10:28 +0200
commitc4d23d02ec5a26d09d389dcf7b8928ecd5798ccc (patch)
tree842e4126b7cc428e8ec31dab4a14b485c1cd78d9
parentauth-filter: do not write more than we've read (diff)
downloadcgit-pink-c4d23d02ec5a26d09d389dcf7b8928ecd5798ccc.tar.gz
cgit-pink-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.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
 
pan>Bind up and down arrows to scrollJune McEnroe 2019-02-22Remove topic TODOJune McEnroe 2019-02-22Add /znc commandJune McEnroe 2019-02-22Update status line after scrolling and term eventsJune McEnroe 2019-02-22Reorganize input.cJune McEnroe 2019-02-22Fix name of <raw> window in man pageJune McEnroe 2019-02-22Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe 2019-02-21Replace "view" with "window"June McEnroe 2019-02-21Remove ROT13June McEnroe 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe