mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-23 00:11:03 +00:00
Randomize bogus secret match
This commit is contained in:
parent
19df41d537
commit
930f833c35
1 changed files with 3 additions and 1 deletions
|
@ -81,7 +81,9 @@ def secret_match(secret):
|
|||
return secret == s.get_str("secret_0") or secret == s.get_str("secret_1")
|
||||
|
||||
def secret_bogus_match(secret):
|
||||
return secret == get_bogus_secret()
|
||||
if random.randint(0, 1) == 0:
|
||||
return secret == get_bogus_secret()
|
||||
return False
|
||||
|
||||
def get_current_secret():
|
||||
return get_storage().get_str("secret_1")
|
||||
|
|
Loading…
Reference in a new issue