Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure thread safety - Ciphers #638

Open
MrSebastian opened this issue Dec 11, 2024 · 0 comments
Open

Ensure thread safety - Ciphers #638

MrSebastian opened this issue Dec 11, 2024 · 0 comments

Comments

@MrSebastian
Copy link
Member

          _:warning: Potential issue_

Ensure thread safety by avoiding shared Cipher instances

Cipher instances are not thread-safe. Injecting them as shared beans and storing them as class fields may lead to concurrency issues in a multi-threaded environment.

Recommend obtaining new Cipher instances within each method call or configuring the Cipher beans with prototype scope to provide a new instance per injection.

Also applies to: 31-37

Originally posted by @coderabbitai[bot] in #635 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant