mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-13 03:08:14 +00:00
Fix incorrect bad auth on freshly changed password
If the database backing the password had changed but cache hadn't updated, then the cache miss was taken as always meaning no valid login.
This commit is contained in:
parent
3e1690c860
commit
99d01d707f
@ -119,9 +119,9 @@ def _prune_passcache():
|
||||
while True:
|
||||
curtime = time.time()
|
||||
for passent in _passcache.iterkeys():
|
||||
if passent[2] < curtime - 10:
|
||||
if passent[2] < curtime - 90:
|
||||
del _passcache[passent]
|
||||
eventlet.sleep(10)
|
||||
eventlet.sleep(90)
|
||||
|
||||
|
||||
def _get_usertenant(name, tenant=False):
|
||||
@ -249,7 +249,6 @@ def check_user_passphrase(name, passphrase, operation=None, element=None, tenant
|
||||
# while someone is legitimately logged in
|
||||
# invalidate cache and force the slower check
|
||||
del _passcache[(user, tenant)]
|
||||
return None
|
||||
if 'cryptpass' in ucfg:
|
||||
_passchecking[(user, tenant)] = True
|
||||
# TODO(jbjohnso): WORKERPOOL
|
||||
|
Loading…
x
Reference in New Issue
Block a user