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



##########
File path: apisix/plugins/hmac-auth.lua
##########
@@ -246,10 +246,13 @@ local function validate(ctx, params)
 
     core.log.info("clock_skew: ", conf.clock_skew)
     if conf.clock_skew and conf.clock_skew > 0 then
-        local diff = abs(ngx_time() - params.timestamp)
-        core.log.info("timestamp diff: ", diff)
-        if diff > conf.clock_skew then
-          return nil, {message = "Invalid timestamp"}
+        local time = ngx.parse_http_time(params.date)

Review comment:
       if the `time` is nil, I think we should throw an error message and write 
an error log




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