Skip to content

Commit

Permalink
fix(basic-auth) remove NYI instruction
Browse files Browse the repository at this point in the history
The call to `next` on this plugin checked whether table m was empty.
Since only m[1] is used later on, I changed the check to test whether
m[1] exists.
  • Loading branch information
kikito authored and p0pr0ck5 committed Jul 10, 2017
1 parent 926bdc8 commit 786f171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kong/plugins/basic-auth/access.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ local function retrieve_credentials(request, header_name, conf)
return
end

if m and next(m) then
if m and m[1] then
local decoded_basic = ngx.decode_base64(m[1])
if decoded_basic then
local basic_parts = utils.split(decoded_basic, ":")
Expand Down

0 comments on commit 786f171

Please sign in to comment.