openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 84e2b1d76408656fbde4c549d56a791fe82e0443
parent 62e7e8e2ba51e02e314cbe153f6d7d7a643d4523
Author: Jan Dankert <devnull@localhost>
Date:   Fri, 10 Nov 2017 21:31:04 +0100

Abgelaufenes Kennwort kann noch eine Karenzzeit benutzt werden.

Diffstat:
auth/InternalAuth.class.php | 7+++++--
config/config-default.php | 2+-
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/auth/InternalAuth.class.php b/auth/InternalAuth.class.php @@ -57,10 +57,13 @@ SQL if ( $row_user['password_expires'] != null && $row_user['password_expires'] < time() ) { // Kennwort ist abgelaufen. - if ( config('security','password','deny_if_expired') ) + + // Wenn das kennwort abgelaufen ist, kann es eine bestimmte Dauer noch benutzt und geändert werden. + // Nach Ablauf dieser Dauer wird das Login abgelehnt. + if ( $row_user['password_expires'] +(config('security','deny_after_expiration_duration')*60*60) < time() ) return false; // Abgelaufenes Kennwort wird nicht mehr akzeptiert. else - return OR_AUTH_STATUS_PW_EXPIRED; + return OR_AUTH_STATUS_PW_EXPIRED; // Kennwort ist abgelaufen, kann aber noch geändert werden. } if ( $row_user['totp'] == 1 ) diff --git a/config/config-default.php b/config/config-default.php @@ -750,7 +750,7 @@ $conf['security']['password'] = array(); $conf['security']['password']['random_length']=10; $conf['security']['password']['min_length']=6; $conf['security']['password']['pepper']= ''; -$conf['security']['password']['deny_if_expired'] = false; +$conf['security']['password']['deny_after_expiration_duration'] = 72; $conf['security']['password']['force_change_if_cleartext']= true; $conf['security']['http'] = array(); $conf['security']['http']['url']= "http://example.net/restricted-area";