You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/24 05:34:47 UTC

[GitHub] [apisix] Firstsawyou commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
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:
       Nice, updated.




----------------------------------------------------------------
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:
users@infra.apache.org