mozilla-iam / mozilla.oidc.accessproxy

Stand-alone OIDC Access Proxy
Mozilla Public License 2.0
11 stars 10 forks source link

X-Forwarded-Groups is always empty #19

Closed gene1wood closed 6 years ago

gene1wood commented 6 years ago

This conditional doesn't work

if not usergrp == "" or not usergrp == nil then

This evaluates with lua precedence like this

if ((not usergrp) == "") or ((not usergrp )== nil) then

which means that if usergrp contains a table, this conditional still evaluates to false

This needs to be like this instead

if usergrp ~= "" and usergrp ~= nil then