moonming commented on a change in pull request #5682:
URL: https://github.com/apache/apisix/pull/5682#discussion_r763560122
##
File path: apisix/patch.lua
##
@@ -86,6 +93,64 @@ do
end
+do -- `math.randomseed` patch
+
+-- Seeds the random generator, use with care.
+-- Once - properly - seeded, this method is replaced with a stub
+-- one. This is to enforce best-practices for seeding in ngx_lua,
+-- and prevents third-party modules from overriding our correct seed
+-- (many modules make a wrong usage of `math.randomseed()` by calling
+-- it multiple times or by not using unique seeds for Nginx workers).
+-- Inspired by kong.globalpatches
Review comment:
if these codes are copied from kong, you MUST add copyright in
https://github.com/apache/apisix/blob/master/LICENSE.
if not, please remove this line.
--
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-unsubscr...@apisix.apache.org
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org