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 2022/01/26 14:10:48 UTC

[GitHub] [apisix] Baoyuantop commented on a change in pull request #6201: feat: add expires timestamp for CSRF plugin

Baoyuantop commented on a change in pull request #6201:
URL: https://github.com/apache/apisix/pull/6201#discussion_r792674932



##########
File path: apisix/plugins/csrf.lua
##########
@@ -75,11 +75,12 @@ end
 
 local function gen_csrf_token(conf)
     local random = math.random()
-    local sign = gen_sign(random, conf.expires, conf.key)
+    local expires_timestamp = ngx_time() + conf.expires
+    local sign = gen_sign(random, expires_timestamp, conf.key)

Review comment:
       Thank you for your guidance.




-- 
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: notifications-unsubscribe@apisix.apache.org

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