leslie-tsang commented on a change in pull request #5419:
URL: https://github.com/apache/apisix/pull/5419#discussion_r742572618



##########
File path: apisix/plugins/basic-auth.lua
##########
@@ -80,12 +80,19 @@ local function extract_auth_header(authorization)
             return nil, err
         end
 
+        if not m then
+            return nil, "Invalid authorization header format"
+        end
+
         local decoded = ngx.decode_base64(m[1])

Review comment:
       @spacewander seems decode_base64 always return a `ffi_string`
   
https://github.com/openresty/lua-resty-core/blob/985eb5b323468effaa66deb5cbd4f800b99834cf/lib/resty/core/base64.lua#L60




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to