membphis commented on a change in pull request #2830:
URL: https://github.com/apache/apisix/pull/2830#discussion_r529184449



##########
File path: apisix/plugins/hmac-auth.lua
##########
@@ -224,6 +224,13 @@ local function generate_signature(ctx, secret_key, params)
 
         for _, key in pairs(keys) do
             local param = args[key]
+            -- when args without `=<value>`, value is treated as true.
+            -- In order to be compatible with args lacking `=<value>`,
+            -- we need to replace true with an empty string.
+            if param == true then

Review comment:
       `type(param) == "boolean"` is better




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to