mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
DEV: Fix redis.sadd
warnings (#23244)
``` Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead ```
This commit is contained in:
@ -41,7 +41,7 @@ class CommonPasswords
|
||||
|
||||
def self.load_passwords
|
||||
passwords = File.readlines(PASSWORD_FILE)
|
||||
redis.sadd LIST_KEY, passwords.map!(&:chomp)
|
||||
redis.sadd?(LIST_KEY, passwords.map!(&:chomp))
|
||||
rescue Errno::ENOENT
|
||||
# tolerate this so we don't block signups
|
||||
Rails.logger.error "Common passwords file #{PASSWORD_FILE} is not found! Common password checking is skipped."
|
||||
|
Reference in New Issue
Block a user