discourse/lib/auth
Osama Sayegh 70fa67a9e1
FIX: Don't leak unhashed user API keys to redis (#14682)
User API keys (not the same thing as admin API keys) are currently
leaked to redis when rate limits are applied to them since redis is the
backend for rate limits in Discourse and the API keys are included in
the redis keys that are used to track usage of user API keys in the last
24 hours.

This commit stops the leak by using a SHA-256 representation of the user
API key instead of the key itself to form the redis key.

We don't need to manually delete the existing redis keys that contain
unhashed user API keys because they're not long-lived and will be
automatically deleted within 48 hours after this commit is deployed to
your Discourse instance.
2021-10-21 19:43:26 +03:00
..
auth_provider.rb DEV: Deprecate message parameter in auth provider plugin API (#12523) 2021-03-25 13:23:48 +00:00
authenticator.rb DEV: Correct spelling mistakes in comments 2021-05-21 13:37:17 +10:00
current_user_provider.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
default_current_user_provider.rb FIX: Don't leak unhashed user API keys to redis (#14682) 2021-10-21 19:43:26 +03:00
discord_authenticator.rb FEATURE: Login with Discord (#8053) 2019-08-30 10:54:19 +01:00
facebook_authenticator.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
github_authenticator.rb DEV: Migrate Github authentication to ManagedAuthenticator (#11170) 2020-11-10 10:09:15 +00:00
google_oauth2_authenticator.rb FIX: Avoid clock skew issues when logging in with Google (#11442) 2020-12-09 09:09:31 +00:00
managed_authenticator.rb DEV: Correct spelling mistakes in comments 2021-05-21 13:37:17 +10:00
oauth2_authenticator.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
result.rb UX: suspend forever time period messages (#13776) 2021-07-20 14:42:08 +04:00
twitter_authenticator.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00