From f8e924b4f1679ee5a8e74b7b1b8149b7401e1852 Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Sat, 5 May 2007 04:58:47 +0000 Subject: only remove expired sessions for a few minutes, not an entire hour, check for empty( ['captcha'] ) --- BitUser.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'BitUser.php') diff --git a/BitUser.php b/BitUser.php index def3d9d..a51354b 100644 --- a/BitUser.php +++ b/BitUser.php @@ -1,6 +1,6 @@ - * @version $Revision: 1.131 $ + * @version $Revision: 1.132 $ * @package users * @subpackage BitUser */ @@ -214,7 +214,7 @@ class BitUser extends LibertyAttachable { } } // Delete old connections nightly during the hour of 3 am - if( date( 'H' ) == '03' ) { + if( date( 'H' ) == '03' && date( 'i' ) > 0 && date( 'i' ) < 2 ) { // Default to 30 days history $oldy = $update['last_get'] - ($gBitSystem->getConfig( 'users_cnxn_history_days', 30 ) * 24 * 60); $query = "DELETE from `".BIT_DB_PREFIX."users_cnxn` where `connect_time`hasPermission( 'p_users_bypass_captcha' ) || ( !empty( $_SESSION['captcha_verified'] ) && $_SESSION['captcha_verified'] === TRUE ) ) { return TRUE; } else { - if( empty( $pCaptcha ) || $_SESSION['captcha'] != md5( $pCaptcha ) ) { + if( empty( $pCaptcha ) || empty( $_SESSION['captcha'] ) || $_SESSION['captcha'] != md5( $pCaptcha ) ) { return FALSE; } else { $_SESSION['captcha_verified'] = TRUE; -- cgit v1.3