mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
rpcserver: fix local vs utc time comparison
login_password did not work properly in timezones other than +0h because local time was compared with utc time. Bug introduced in: https://fedorahosted.org/freeipa/ticket/4339 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
parent
70c77e6a3c
commit
1c94edd3a0
@ -959,7 +959,7 @@ class login_password(Backend, KerberosSession, HTTP_Status):
|
||||
['krbpasswordexpiration'])
|
||||
if 'krbpasswordexpiration' in entry_attrs:
|
||||
expiration = entry_attrs['krbpasswordexpiration'][0]
|
||||
if expiration <= datetime.datetime.now():
|
||||
if expiration <= datetime.datetime.utcnow():
|
||||
reason = 'password-expired'
|
||||
|
||||
except Exception:
|
||||
|
Loading…
Reference in New Issue
Block a user