fosite
fosite copied to clipboard
Why does HMACStrategy.Generate uses a lock?
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe the bug
While reading the code, I noticed that HMACStrategy.Generate
uses a mutex lock, but I do not get why it exists. No code there has any global or local state?
This was introduced in https://github.com/ory/fosite/commit/b4b9be5640c9d814b35f54b2c8621137364209ca, but I also do not get why.
Given that this is used a lot, I think mutex could be removed?
Reproducing the bug
N/A
Relevant log output
No response
Relevant configuration
No response
Version
latest master
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response