This website requires JavaScript.
Explore
关于
常见问题
Help
Sign in
Discourse
/
discourse
Watch
2
Star
0
Fork
You've already forked discourse
0
mirror of
https://github.com/discourse/discourse.git
synced
2025-09-07 12:02:53 +08:00
Code
Packages
Activity
Actions
5
ae0625323a
discourse
/
spec
/
fabricators
/
api_key_fabricator.rb
6 lines
60 B
Ruby
Raw
Normal View
History
Unescape
Escape
DEV: use #frozen_string_literal: true on all spec This change both speeds up specs (less strings to allocate) and helps catch cases where methods in Discourse are mutating inputs. Overall we will be migrating everything to use #frozen_string_literal: true it will take a while, but this is the first and safest move in this direction
2019-04-30 10:27:42 +10:00
# frozen_string_literal: true
Support for per-user API keys
2013-10-22 15:53:08 -04:00
Fabricator
(
:api_key
)
do
FEATURE: Hash API keys in the database (#8438) API keys are now only visible when first created. After that, only the first four characters are stored in the database for identification, along with an sha256 hash of the full key. This makes key usage easier to audit, and ensures attackers would not have access to the live site in the event of a database leak. This makes the merge lower risk, because we have some time to revert if needed. Once the change is confirmed to be working, we will add a second commit to drop the `key` column.
2019-12-12 11:45:00 +00:00
Don't blow up if Redis switches to READONLY
2015-04-24 13:10:43 -04:00
end
Copy permalink