Changeset 497049
- Timestamp:
- 01/29/2012 09:03:19 PM (14 years ago)
- Location:
- login-lock
- Files:
-
- 2 edited
- 16 copied
-
tags/2.2.4 (copied) (copied from login-lock/trunk)
-
tags/2.2.4/css/wpsec-login.css (copied) (copied from login-lock/trunk/css/wpsec-login.css)
-
tags/2.2.4/images/coins.png (copied) (copied from login-lock/trunk/images/coins.png)
-
tags/2.2.4/images/icon-twitter16x16.png (copied) (copied from login-lock/trunk/images/icon-twitter16x16.png)
-
tags/2.2.4/loginlock.php (copied) (copied from login-lock/trunk/loginlock.php) (14 diffs)
-
tags/2.2.4/loginlock_psws.php (copied) (copied from login-lock/trunk/loginlock_psws.php)
-
tags/2.2.4/plugin_tools.php (copied) (copied from login-lock/trunk/plugin_tools.php)
-
tags/2.2.4/readme.txt (copied) (copied from login-lock/trunk/readme.txt) (2 diffs)
-
tags/2.2.4/trunk (copied) (copied from login-lock/trunk)
-
tags/2.2.4/trunk/css/wpsec-login.css (copied) (copied from login-lock/trunk/css/wpsec-login.css)
-
tags/2.2.4/trunk/images/coins.png (copied) (copied from login-lock/trunk/images/coins.png)
-
tags/2.2.4/trunk/images/icon-twitter16x16.png (copied) (copied from login-lock/trunk/images/icon-twitter16x16.png)
-
tags/2.2.4/trunk/loginlock.php (copied) (copied from login-lock/trunk/loginlock.php) (15 diffs)
-
tags/2.2.4/trunk/loginlock_psws.php (copied) (copied from login-lock/trunk/loginlock_psws.php)
-
tags/2.2.4/trunk/plugin_tools.php (copied) (copied from login-lock/trunk/plugin_tools.php)
-
tags/2.2.4/trunk/readme.txt (copied) (copied from login-lock/trunk/readme.txt) (2 diffs)
-
trunk/loginlock.php (modified) (15 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
login-lock/tags/2.2.4/loginlock.php
r391825 r497049 3 3 Plugin Name: Login Lock 4 4 Plugin URI: https://wpsecurity.net/wordpress-security-login-lock/ 5 Version: v2.2. 35 Version: v2.2.4 6 6 Author: Mark Edwards / WPSecurity.net 7 7 Author URI: https://wpsecurity.net … … 24 24 25 25 26 define( 'WPSEC_LOGINLOCK_VERSION', '2. 0' );26 define( 'WPSEC_LOGINLOCK_VERSION', '2.2.4' ); 27 27 define( 'WPSEC_LOGINLOCK_DB_VERSION', '2.0' ); 28 28 define( 'WPSEC_LOGINLOCK_URL', plugin_dir_url(__FILE__) ); … … 50 50 add_action('login_form', array( &$this, 'login_lock_notice' ) ); 51 51 add_filter('authenticate', array( &$this, 'll_wp_authenticate'), 21, 3); 52 add_action(' plugins_loaded', array( &$this, 'll_styles') );52 add_action('admin_enqueue_scripts', array( &$this, 'll_styles') ); 53 53 add_action('admin_notices', array( &$this, 'login_notice_show') ); 54 54 add_action('shutdown', array(&$this, 'login_notice_check') ); … … 92 92 global $wpdb; 93 93 94 require_once(ABSPATH . 'wp-admin/upgrade-functions.php'); 94 $table_name = $wpdb->prefix . "lockdowns"; 95 96 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 95 97 96 98 if( $wpdb->get_var("SHOW TABLES LIKE '".$this->fail_table."'") != $this->fail_table ) { … … 106 108 dbDelta($sql); 107 109 110 if ($wpdb->last_error) 111 die($wpdb->last_error); 112 108 113 add_option("loginlock_table1_version", WPSEC_LOGINLOCK_DB_VERSION); 109 114 } 110 111 $table_name = $wpdb->prefix . "lockdowns";112 115 113 116 if( $wpdb->get_var("SHOW TABLES LIKE '".$this->lock_table."'") != $this->lock_table ) { … … 122 125 123 126 dbDelta($sql); 127 128 if ($wpdb->last_error) 129 die($wpdb->last_error); 124 130 125 131 add_option("loginlock_table2_version", WPSEC_LOGINLOCK_DB_VERSION); … … 181 187 182 188 183 //echo date('m-d-y H:i:s', time()). ' -> '. strtotime('April 29, 2011 16:36:00'). ' --> <br/>'; 184 //wp_reschedule_event( strtotime('April 29, 2011 16:37:00') , 'hourly', 'loginlock_event'); 185 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 186 187 // $this->login_notice_check(); 188 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 189 //echo date('m-d-y H:i:s', time()). ' -> '. strtotime('April 29, 2011 16:36:00'). ' --> <br/>'; 190 //wp_reschedule_event( strtotime('April 29, 2011 16:37:00') , 'hourly', 'loginlock_event'); 191 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 192 193 // $this->login_notice_check(); 194 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 195 189 196 register_setting( 'llp_options', 'llp_options', array( &$this, 'llp_validate') ); 190 197 if ( count($_GET) <= 0 ) return; … … 248 255 $username = sanitize_user($username); 249 256 250 $user = get_user databylogin($username);257 $user = get_user_by( 'login', $username ); 251 258 252 259 if ( !$user ) { … … 270 277 $username = sanitize_user($username); 271 278 272 $user = get_user databylogin($username);279 $user = get_user_by( 'login', $username ); 273 280 274 281 if ( !$user ) { … … 417 424 global $wpdb; 418 425 419 if ( !$user) return;420 421 if ( !isset($user->user_pass)) return;426 if ( !isset($user->ID) ) return; 427 428 if ( !isset( $user->user_pass ) ) return; 422 429 423 430 $oh = get_user_meta( $user->ID, 'll_old_hashes', true); … … 699 706 } 700 707 ?> 701 <p id="backtoblog"><a href="<?php bloginfo(' url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>708 <p id="backtoblog"><a href="<?php bloginfo('wpurl'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p> 702 709 <?php do_action('login_footer'); ?> 703 710 </body> … … 925 932 } 926 933 927 if ( count( $errors->errors ) <= 0 ) {934 if ( count( $errors->errors ) <= 0 && !empty( $user->ID ) ) { 928 935 $this->save_psw_hash( $user ); 929 936 delete_user_meta( $user->ID, 'll_force_password_change_now'); … … 1065 1072 1066 1073 function ll_update_login_timestamp( $username = '' ) { 1067 $u = get_user databylogin($username );1074 $u = get_user_by( 'login', $username ); 1068 1075 $uid = $u->ID; 1069 1076 if ( intval($uid) <= 0) return; … … 1529 1536 } 1530 1537 1531 $userdata = get_user databylogin($username);1538 $userdata = get_user_by( 'login', $username ); 1532 1539 1533 1540 if ( !$userdata ) { -
login-lock/tags/2.2.4/readme.txt
r391825 r497049 3 3 Donate link: https://wpsecurity.net/wordpress-security-login-lock/ 4 4 Tags: login, security 5 Requires at least: 2.56 Tested up to: 3. 1.37 Stable Tag: 2.2. 35 Requires at least: 3.2 6 Tested up to: 3.3.1 7 Stable Tag: 2.2.4 8 8 9 9 Enforces strong password policies; provides emergency lockdown features; monitors login attempts; blocks hacker IP addresses; and logs out idle users. … … 72 72 == Changelog == 73 73 74 = 2.2.4 = 75 * Bug fixes related to newer versions of WordPress. 76 * Raised minimum WordPress version requirement. 77 * Thanks to Daniel Convissor for assistance on bug fixes. 78 74 79 = 2.2.3 = 75 80 * Fixed bug where users might see an error "Fatal error: Call to undefined function login_header()" when resetting their password. -
login-lock/tags/2.2.4/trunk/loginlock.php
r391825 r497049 3 3 Plugin Name: Login Lock 4 4 Plugin URI: https://wpsecurity.net/wordpress-security-login-lock/ 5 Version: v2.2. 35 Version: v2.2.4 6 6 Author: Mark Edwards / WPSecurity.net 7 7 Author URI: https://wpsecurity.net … … 24 24 25 25 26 define( 'WPSEC_LOGINLOCK_VERSION', '2. 0' );26 define( 'WPSEC_LOGINLOCK_VERSION', '2.2.4' ); 27 27 define( 'WPSEC_LOGINLOCK_DB_VERSION', '2.0' ); 28 28 define( 'WPSEC_LOGINLOCK_URL', plugin_dir_url(__FILE__) ); … … 50 50 add_action('login_form', array( &$this, 'login_lock_notice' ) ); 51 51 add_filter('authenticate', array( &$this, 'll_wp_authenticate'), 21, 3); 52 add_action(' plugins_loaded', array( &$this, 'll_styles') );52 add_action('admin_enqueue_scripts', array( &$this, 'll_styles') ); 53 53 add_action('admin_notices', array( &$this, 'login_notice_show') ); 54 54 add_action('shutdown', array(&$this, 'login_notice_check') ); … … 92 92 global $wpdb; 93 93 94 require_once(ABSPATH . 'wp-admin/upgrade-functions.php'); 94 $table_name = $wpdb->prefix . "lockdowns"; 95 96 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 95 97 96 98 if( $wpdb->get_var("SHOW TABLES LIKE '".$this->fail_table."'") != $this->fail_table ) { … … 106 108 dbDelta($sql); 107 109 110 if ($wpdb->last_error) 111 die($wpdb->last_error); 112 108 113 add_option("loginlock_table1_version", WPSEC_LOGINLOCK_DB_VERSION); 109 114 } 110 111 $table_name = $wpdb->prefix . "lockdowns";112 115 113 116 if( $wpdb->get_var("SHOW TABLES LIKE '".$this->lock_table."'") != $this->lock_table ) { … … 122 125 123 126 dbDelta($sql); 127 128 if ($wpdb->last_error) 129 die($wpdb->last_error); 124 130 125 131 add_option("loginlock_table2_version", WPSEC_LOGINLOCK_DB_VERSION); … … 181 187 182 188 183 //echo date('m-d-y H:i:s', time()). ' -> '. strtotime('April 29, 2011 16:36:00'). ' --> <br/>'; 184 //wp_reschedule_event( strtotime('April 29, 2011 16:37:00') , 'hourly', 'loginlock_event'); 185 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 186 187 // $this->login_notice_check(); 188 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 189 //echo date('m-d-y H:i:s', time()). ' -> '. strtotime('April 29, 2011 16:36:00'). ' --> <br/>'; 190 //wp_reschedule_event( strtotime('April 29, 2011 16:37:00') , 'hourly', 'loginlock_event'); 191 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 192 193 // $this->login_notice_check(); 194 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 195 189 196 register_setting( 'llp_options', 'llp_options', array( &$this, 'llp_validate') ); 190 197 if ( count($_GET) <= 0 ) return; … … 248 255 $username = sanitize_user($username); 249 256 250 $user = get_user databylogin($username);257 $user = get_user_by( 'login', $username ); 251 258 252 259 if ( !$user ) { … … 270 277 $username = sanitize_user($username); 271 278 272 $user = get_user databylogin($username);279 $user = get_user_by( 'login', $username ); 273 280 274 281 if ( !$user ) { … … 417 424 global $wpdb; 418 425 419 if ( !$user) return;420 421 if ( !isset($user->user_pass)) return;426 if ( !isset($user->ID) ) return; 427 428 if ( !isset( $user->user_pass ) ) return; 422 429 423 430 $oh = get_user_meta( $user->ID, 'll_old_hashes', true); … … 578 585 579 586 function ll_force_reset_psw() { 580 global $wpdb, $current_user; 587 global $wpdb, $current_user, $wp_locale; 588 589 // hopefully a fix for problems with " is_rtl() is not a function " 590 if ( !$wp_locale ) { 591 592 require_once( ABSPATH . '/wp-includes/locale.php' ); 593 $wp_locale = new WP_Locale(); 594 595 } 581 596 582 597 get_currentuserinfo(); … … 699 714 } 700 715 ?> 701 <p id="backtoblog"><a href="<?php bloginfo(' url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>716 <p id="backtoblog"><a href="<?php bloginfo('wpurl'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p> 702 717 <?php do_action('login_footer'); ?> 703 718 </body> … … 925 940 } 926 941 927 if ( count( $errors->errors ) <= 0 ) {942 if ( count( $errors->errors ) <= 0 && !empty( $user->ID ) ) { 928 943 $this->save_psw_hash( $user ); 929 944 delete_user_meta( $user->ID, 'll_force_password_change_now'); … … 1065 1080 1066 1081 function ll_update_login_timestamp( $username = '' ) { 1067 $u = get_user databylogin($username );1082 $u = get_user_by( 'login', $username ); 1068 1083 $uid = $u->ID; 1069 1084 if ( intval($uid) <= 0) return; … … 1529 1544 } 1530 1545 1531 $userdata = get_user databylogin($username);1546 $userdata = get_user_by( 'login', $username ); 1532 1547 1533 1548 if ( !$userdata ) { -
login-lock/tags/2.2.4/trunk/readme.txt
r391825 r497049 3 3 Donate link: https://wpsecurity.net/wordpress-security-login-lock/ 4 4 Tags: login, security 5 Requires at least: 2.56 Tested up to: 3. 1.37 Stable Tag: 2.2. 35 Requires at least: 3.2 6 Tested up to: 3.3.1 7 Stable Tag: 2.2.4 8 8 9 9 Enforces strong password policies; provides emergency lockdown features; monitors login attempts; blocks hacker IP addresses; and logs out idle users. … … 72 72 == Changelog == 73 73 74 = 2.2.4 = 75 * Bug fixes related to newer versions of WordPress. 76 * Potential bug fix for errors where wp-includes/general-template.php fails with " is_rtl() is not a function " 77 * Raised minimum WordPress version requirement. 78 * Thanks to Daniel Convissor for assistance on bug fixes. 79 74 80 = 2.2.3 = 75 81 * Fixed bug where users might see an error "Fatal error: Call to undefined function login_header()" when resetting their password. -
login-lock/trunk/loginlock.php
r391825 r497049 3 3 Plugin Name: Login Lock 4 4 Plugin URI: https://wpsecurity.net/wordpress-security-login-lock/ 5 Version: v2.2. 35 Version: v2.2.4 6 6 Author: Mark Edwards / WPSecurity.net 7 7 Author URI: https://wpsecurity.net … … 24 24 25 25 26 define( 'WPSEC_LOGINLOCK_VERSION', '2. 0' );26 define( 'WPSEC_LOGINLOCK_VERSION', '2.2.4' ); 27 27 define( 'WPSEC_LOGINLOCK_DB_VERSION', '2.0' ); 28 28 define( 'WPSEC_LOGINLOCK_URL', plugin_dir_url(__FILE__) ); … … 50 50 add_action('login_form', array( &$this, 'login_lock_notice' ) ); 51 51 add_filter('authenticate', array( &$this, 'll_wp_authenticate'), 21, 3); 52 add_action(' plugins_loaded', array( &$this, 'll_styles') );52 add_action('admin_enqueue_scripts', array( &$this, 'll_styles') ); 53 53 add_action('admin_notices', array( &$this, 'login_notice_show') ); 54 54 add_action('shutdown', array(&$this, 'login_notice_check') ); … … 92 92 global $wpdb; 93 93 94 require_once(ABSPATH . 'wp-admin/upgrade-functions.php'); 94 $table_name = $wpdb->prefix . "lockdowns"; 95 96 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 95 97 96 98 if( $wpdb->get_var("SHOW TABLES LIKE '".$this->fail_table."'") != $this->fail_table ) { … … 106 108 dbDelta($sql); 107 109 110 if ($wpdb->last_error) 111 die($wpdb->last_error); 112 108 113 add_option("loginlock_table1_version", WPSEC_LOGINLOCK_DB_VERSION); 109 114 } 110 111 $table_name = $wpdb->prefix . "lockdowns";112 115 113 116 if( $wpdb->get_var("SHOW TABLES LIKE '".$this->lock_table."'") != $this->lock_table ) { … … 122 125 123 126 dbDelta($sql); 127 128 if ($wpdb->last_error) 129 die($wpdb->last_error); 124 130 125 131 add_option("loginlock_table2_version", WPSEC_LOGINLOCK_DB_VERSION); … … 181 187 182 188 183 //echo date('m-d-y H:i:s', time()). ' -> '. strtotime('April 29, 2011 16:36:00'). ' --> <br/>'; 184 //wp_reschedule_event( strtotime('April 29, 2011 16:37:00') , 'hourly', 'loginlock_event'); 185 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 186 187 // $this->login_notice_check(); 188 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 189 //echo date('m-d-y H:i:s', time()). ' -> '. strtotime('April 29, 2011 16:36:00'). ' --> <br/>'; 190 //wp_reschedule_event( strtotime('April 29, 2011 16:37:00') , 'hourly', 'loginlock_event'); 191 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 192 193 // $this->login_notice_check(); 194 //var_dump( date( 'm-d-y H:i:s' , wp_next_scheduled( 'loginlock_event'))); echo ' -- >'.time(); 195 189 196 register_setting( 'llp_options', 'llp_options', array( &$this, 'llp_validate') ); 190 197 if ( count($_GET) <= 0 ) return; … … 248 255 $username = sanitize_user($username); 249 256 250 $user = get_user databylogin($username);257 $user = get_user_by( 'login', $username ); 251 258 252 259 if ( !$user ) { … … 270 277 $username = sanitize_user($username); 271 278 272 $user = get_user databylogin($username);279 $user = get_user_by( 'login', $username ); 273 280 274 281 if ( !$user ) { … … 417 424 global $wpdb; 418 425 419 if ( !$user) return;420 421 if ( !isset($user->user_pass)) return;426 if ( !isset($user->ID) ) return; 427 428 if ( !isset( $user->user_pass ) ) return; 422 429 423 430 $oh = get_user_meta( $user->ID, 'll_old_hashes', true); … … 578 585 579 586 function ll_force_reset_psw() { 580 global $wpdb, $current_user; 587 global $wpdb, $current_user, $wp_locale; 588 589 // hopefully a fix for problems with " is_rtl() is not a function " 590 if ( !$wp_locale ) { 591 592 require_once( ABSPATH . '/wp-includes/locale.php' ); 593 $wp_locale = new WP_Locale(); 594 595 } 581 596 582 597 get_currentuserinfo(); … … 699 714 } 700 715 ?> 701 <p id="backtoblog"><a href="<?php bloginfo(' url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>716 <p id="backtoblog"><a href="<?php bloginfo('wpurl'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p> 702 717 <?php do_action('login_footer'); ?> 703 718 </body> … … 925 940 } 926 941 927 if ( count( $errors->errors ) <= 0 ) {942 if ( count( $errors->errors ) <= 0 && !empty( $user->ID ) ) { 928 943 $this->save_psw_hash( $user ); 929 944 delete_user_meta( $user->ID, 'll_force_password_change_now'); … … 1065 1080 1066 1081 function ll_update_login_timestamp( $username = '' ) { 1067 $u = get_user databylogin($username );1082 $u = get_user_by( 'login', $username ); 1068 1083 $uid = $u->ID; 1069 1084 if ( intval($uid) <= 0) return; … … 1529 1544 } 1530 1545 1531 $userdata = get_user databylogin($username);1546 $userdata = get_user_by( 'login', $username ); 1532 1547 1533 1548 if ( !$userdata ) { -
login-lock/trunk/readme.txt
r391825 r497049 3 3 Donate link: https://wpsecurity.net/wordpress-security-login-lock/ 4 4 Tags: login, security 5 Requires at least: 2.56 Tested up to: 3. 1.37 Stable Tag: 2.2. 35 Requires at least: 3.2 6 Tested up to: 3.3.1 7 Stable Tag: 2.2.4 8 8 9 9 Enforces strong password policies; provides emergency lockdown features; monitors login attempts; blocks hacker IP addresses; and logs out idle users. … … 72 72 == Changelog == 73 73 74 = 2.2.4 = 75 * Bug fixes related to newer versions of WordPress. 76 * Potential bug fix for errors where wp-includes/general-template.php fails with " is_rtl() is not a function " 77 * Raised minimum WordPress version requirement. 78 * Thanks to Daniel Convissor for assistance on bug fixes. 79 74 80 = 2.2.3 = 75 81 * Fixed bug where users might see an error "Fatal error: Call to undefined function login_header()" when resetting their password.
Note: See TracChangeset
for help on using the changeset viewer.