is meant to test if grps is an empty string, and if so to set grps to v. Then on subsequent runs where grps is not an empty string, append the | character followed by v to grps
The result of this is that every X-Forwarded-Groups header is preceded by a | character. For example a user in groups foo and bar would have a grps value of |foo|bar instead of foo|bar
To fix this, change this line from local grps = "" to local grps = false
Once #19 is fixed, you'll encounter this problem.
This line
is meant to test if
grps
is an empty string, and if so to setgrps
tov
. Then on subsequent runs wheregrps
is not an empty string, append the|
character followed byv
togrps
Unfortunately in lua, an empty string evaluates to
true
, notfalse
.The result of this is that every
X-Forwarded-Groups
header is preceded by a|
character. For example a user in groupsfoo
andbar
would have agrps
value of|foo|bar
instead offoo|bar
To fix this, change this line from
local grps = ""
tolocal grps = false