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:
Jarek Radosz
2023-08-28 06:58:47 +02:00
committed by GitHub
parent 09acba17de
commit 09446baf10
2 changed files with 2 additions and 2 deletions

View File

@ -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."