Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the possibility of the seed process generating duplicate API keys.
Lua's math.randomseed doesn't really work effectively when just using the current time as the seed value, since duplicate processes starting up at the same time can lead to duplicate random values. I think this was primarily affecting the test and CI environment, where the seeding might happen multiple times in rapid succession. This fixes it by using cryptographically secure random data to generate the random tokens, which is better anyway (this was taken from some work on the postgres branch, where we had already made this switch in bdaafa5 as part of more widespread usage of this random_token method, besides just for the seeding process).
- Loading branch information