verification: fix some bugs
This commit is contained in:
parent
f219d4411d
commit
1282a40986
1 changed files with 2 additions and 5 deletions
|
@ -68,9 +68,7 @@ class Verification(Cog):
|
||||||
# randomize hash_choice on reset
|
# randomize hash_choice on reset
|
||||||
self.hash_choice = random.choice(
|
self.hash_choice = random.choice(
|
||||||
tuple(
|
tuple(
|
||||||
hashlib.algorithms_guaranteed
|
config.welcome_hashes
|
||||||
- self.blacklisted_hashes
|
|
||||||
- {self.hash_choice}
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -174,9 +172,8 @@ class Verification(Cog):
|
||||||
|
|
||||||
# Detect if the user uses the wrong hash algorithm
|
# Detect if the user uses the wrong hash algorithm
|
||||||
wrong_hash_algos = (
|
wrong_hash_algos = (
|
||||||
hashlib.algorithms_guaranteed
|
config.welcome_hashes
|
||||||
- {self.hash_choice}
|
- {self.hash_choice}
|
||||||
- self.blacklisted_hashes
|
|
||||||
)
|
)
|
||||||
for algo in wrong_hash_algos:
|
for algo in wrong_hash_algos:
|
||||||
for name in itertools.chain(allowed_names, close_names):
|
for name in itertools.chain(allowed_names, close_names):
|
||||||
|
|
Loading…
Reference in a new issue