Plugin Directory

Changeset 497049


Ignore:
Timestamp:
01/29/2012 09:03:19 PM (14 years ago)
Author:
wpsec
Message:

tagging version 2.2.4

Location:
login-lock
Files:
2 edited
16 copied

Legend:

Unmodified
Added
Removed
  • login-lock/tags/2.2.4/loginlock.php

    r391825 r497049  
    33Plugin Name: Login Lock
    44Plugin URI: https://wpsecurity.net/wordpress-security-login-lock/
    5 Version: v2.2.3
     5Version: v2.2.4
    66Author: Mark Edwards / WPSecurity.net
    77Author URI: https://wpsecurity.net
     
    2424
    2525
    26 define( 'WPSEC_LOGINLOCK_VERSION', '2.0' );
     26define( 'WPSEC_LOGINLOCK_VERSION', '2.2.4' );
    2727define( 'WPSEC_LOGINLOCK_DB_VERSION', '2.0' );
    2828define( 'WPSEC_LOGINLOCK_URL', plugin_dir_url(__FILE__) );
     
    5050        add_action('login_form', array( &$this, 'login_lock_notice' ) );
    5151        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') );
    5353        add_action('admin_notices', array( &$this, 'login_notice_show') );
    5454        add_action('shutdown', array(&$this, 'login_notice_check') );
     
    9292        global $wpdb;
    9393
    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');
    9597
    9698        if( $wpdb->get_var("SHOW TABLES LIKE '".$this->fail_table."'") != $this->fail_table ) {
     
    106108            dbDelta($sql);
    107109
     110            if ($wpdb->last_error)
     111                die($wpdb->last_error);
     112
    108113            add_option("loginlock_table1_version", WPSEC_LOGINLOCK_DB_VERSION);
    109114        }
    110 
    111         $table_name = $wpdb->prefix . "lockdowns";
    112115
    113116        if( $wpdb->get_var("SHOW TABLES LIKE '".$this->lock_table."'") != $this->lock_table ) {
     
    122125
    123126            dbDelta($sql);
     127
     128            if ($wpdb->last_error)
     129                die($wpdb->last_error);
    124130
    125131            add_option("loginlock_table2_version", WPSEC_LOGINLOCK_DB_VERSION);
     
    181187
    182188
    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
    189196        register_setting( 'llp_options', 'llp_options', array( &$this, 'llp_validate') );
    190197        if ( count($_GET) <= 0 ) return;
     
    248255        $username = sanitize_user($username);
    249256
    250         $user = get_userdatabylogin($username);
     257        $user = get_user_by( 'login', $username );
    251258
    252259        if ( !$user ) {
     
    270277        $username = sanitize_user($username);
    271278
    272         $user = get_userdatabylogin($username);
     279        $user = get_user_by( 'login', $username );
    273280
    274281        if ( !$user ) {
     
    417424        global $wpdb;
    418425
    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;
    422429
    423430        $oh = get_user_meta( $user->ID, 'll_old_hashes', true);
     
    699706            }
    700707        ?>
    701         <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('&larr; 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(__('&larr; Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
    702709        <?php do_action('login_footer'); ?>
    703710        </body>
     
    925932        }
    926933
    927         if ( count( $errors->errors ) <= 0 ) {
     934        if ( count( $errors->errors ) <= 0 && !empty( $user->ID ) ) {
    928935            $this->save_psw_hash( $user );
    929936            delete_user_meta( $user->ID, 'll_force_password_change_now');
     
    10651072
    10661073    function ll_update_login_timestamp( $username = '' ) {
    1067         $u = get_userdatabylogin( $username );
     1074        $u = get_user_by( 'login', $username );
    10681075        $uid = $u->ID;
    10691076        if ( intval($uid) <= 0) return;
     
    15291536        }
    15301537
    1531         $userdata = get_userdatabylogin($username);
     1538        $userdata = get_user_by( 'login', $username );
    15321539
    15331540        if ( !$userdata ) {
  • login-lock/tags/2.2.4/readme.txt

    r391825 r497049  
    33Donate link: https://wpsecurity.net/wordpress-security-login-lock/
    44Tags: login, security
    5 Requires at least: 2.5
    6 Tested up to: 3.1.3
    7 Stable Tag: 2.2.3
     5Requires at least: 3.2
     6Tested up to: 3.3.1
     7Stable Tag: 2.2.4
    88
    99Enforces strong password policies; provides emergency lockdown features; monitors login attempts; blocks hacker IP addresses; and logs out idle users.
     
    7272== Changelog ==
    7373
     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
    7479= 2.2.3 =
    7580* 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  
    33Plugin Name: Login Lock
    44Plugin URI: https://wpsecurity.net/wordpress-security-login-lock/
    5 Version: v2.2.3
     5Version: v2.2.4
    66Author: Mark Edwards / WPSecurity.net
    77Author URI: https://wpsecurity.net
     
    2424
    2525
    26 define( 'WPSEC_LOGINLOCK_VERSION', '2.0' );
     26define( 'WPSEC_LOGINLOCK_VERSION', '2.2.4' );
    2727define( 'WPSEC_LOGINLOCK_DB_VERSION', '2.0' );
    2828define( 'WPSEC_LOGINLOCK_URL', plugin_dir_url(__FILE__) );
     
    5050        add_action('login_form', array( &$this, 'login_lock_notice' ) );
    5151        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') );
    5353        add_action('admin_notices', array( &$this, 'login_notice_show') );
    5454        add_action('shutdown', array(&$this, 'login_notice_check') );
     
    9292        global $wpdb;
    9393
    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');
    9597
    9698        if( $wpdb->get_var("SHOW TABLES LIKE '".$this->fail_table."'") != $this->fail_table ) {
     
    106108            dbDelta($sql);
    107109
     110            if ($wpdb->last_error)
     111                die($wpdb->last_error);
     112
    108113            add_option("loginlock_table1_version", WPSEC_LOGINLOCK_DB_VERSION);
    109114        }
    110 
    111         $table_name = $wpdb->prefix . "lockdowns";
    112115
    113116        if( $wpdb->get_var("SHOW TABLES LIKE '".$this->lock_table."'") != $this->lock_table ) {
     
    122125
    123126            dbDelta($sql);
     127
     128            if ($wpdb->last_error)
     129                die($wpdb->last_error);
    124130
    125131            add_option("loginlock_table2_version", WPSEC_LOGINLOCK_DB_VERSION);
     
    181187
    182188
    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
    189196        register_setting( 'llp_options', 'llp_options', array( &$this, 'llp_validate') );
    190197        if ( count($_GET) <= 0 ) return;
     
    248255        $username = sanitize_user($username);
    249256
    250         $user = get_userdatabylogin($username);
     257        $user = get_user_by( 'login', $username );
    251258
    252259        if ( !$user ) {
     
    270277        $username = sanitize_user($username);
    271278
    272         $user = get_userdatabylogin($username);
     279        $user = get_user_by( 'login', $username );
    273280
    274281        if ( !$user ) {
     
    417424        global $wpdb;
    418425
    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;
    422429
    423430        $oh = get_user_meta( $user->ID, 'll_old_hashes', true);
     
    578585
    579586    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        }
    581596
    582597        get_currentuserinfo();
     
    699714            }
    700715        ?>
    701         <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('&larr; 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(__('&larr; Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
    702717        <?php do_action('login_footer'); ?>
    703718        </body>
     
    925940        }
    926941
    927         if ( count( $errors->errors ) <= 0 ) {
     942        if ( count( $errors->errors ) <= 0 && !empty( $user->ID ) ) {
    928943            $this->save_psw_hash( $user );
    929944            delete_user_meta( $user->ID, 'll_force_password_change_now');
     
    10651080
    10661081    function ll_update_login_timestamp( $username = '' ) {
    1067         $u = get_userdatabylogin( $username );
     1082        $u = get_user_by( 'login', $username );
    10681083        $uid = $u->ID;
    10691084        if ( intval($uid) <= 0) return;
     
    15291544        }
    15301545
    1531         $userdata = get_userdatabylogin($username);
     1546        $userdata = get_user_by( 'login', $username );
    15321547
    15331548        if ( !$userdata ) {
  • login-lock/tags/2.2.4/trunk/readme.txt

    r391825 r497049  
    33Donate link: https://wpsecurity.net/wordpress-security-login-lock/
    44Tags: login, security
    5 Requires at least: 2.5
    6 Tested up to: 3.1.3
    7 Stable Tag: 2.2.3
     5Requires at least: 3.2
     6Tested up to: 3.3.1
     7Stable Tag: 2.2.4
    88
    99Enforces strong password policies; provides emergency lockdown features; monitors login attempts; blocks hacker IP addresses; and logs out idle users.
     
    7272== Changelog ==
    7373
     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
    7480= 2.2.3 =
    7581* 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  
    33Plugin Name: Login Lock
    44Plugin URI: https://wpsecurity.net/wordpress-security-login-lock/
    5 Version: v2.2.3
     5Version: v2.2.4
    66Author: Mark Edwards / WPSecurity.net
    77Author URI: https://wpsecurity.net
     
    2424
    2525
    26 define( 'WPSEC_LOGINLOCK_VERSION', '2.0' );
     26define( 'WPSEC_LOGINLOCK_VERSION', '2.2.4' );
    2727define( 'WPSEC_LOGINLOCK_DB_VERSION', '2.0' );
    2828define( 'WPSEC_LOGINLOCK_URL', plugin_dir_url(__FILE__) );
     
    5050        add_action('login_form', array( &$this, 'login_lock_notice' ) );
    5151        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') );
    5353        add_action('admin_notices', array( &$this, 'login_notice_show') );
    5454        add_action('shutdown', array(&$this, 'login_notice_check') );
     
    9292        global $wpdb;
    9393
    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');
    9597
    9698        if( $wpdb->get_var("SHOW TABLES LIKE '".$this->fail_table."'") != $this->fail_table ) {
     
    106108            dbDelta($sql);
    107109
     110            if ($wpdb->last_error)
     111                die($wpdb->last_error);
     112
    108113            add_option("loginlock_table1_version", WPSEC_LOGINLOCK_DB_VERSION);
    109114        }
    110 
    111         $table_name = $wpdb->prefix . "lockdowns";
    112115
    113116        if( $wpdb->get_var("SHOW TABLES LIKE '".$this->lock_table."'") != $this->lock_table ) {
     
    122125
    123126            dbDelta($sql);
     127
     128            if ($wpdb->last_error)
     129                die($wpdb->last_error);
    124130
    125131            add_option("loginlock_table2_version", WPSEC_LOGINLOCK_DB_VERSION);
     
    181187
    182188
    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
    189196        register_setting( 'llp_options', 'llp_options', array( &$this, 'llp_validate') );
    190197        if ( count($_GET) <= 0 ) return;
     
    248255        $username = sanitize_user($username);
    249256
    250         $user = get_userdatabylogin($username);
     257        $user = get_user_by( 'login', $username );
    251258
    252259        if ( !$user ) {
     
    270277        $username = sanitize_user($username);
    271278
    272         $user = get_userdatabylogin($username);
     279        $user = get_user_by( 'login', $username );
    273280
    274281        if ( !$user ) {
     
    417424        global $wpdb;
    418425
    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;
    422429
    423430        $oh = get_user_meta( $user->ID, 'll_old_hashes', true);
     
    578585
    579586    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        }
    581596
    582597        get_currentuserinfo();
     
    699714            }
    700715        ?>
    701         <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('&larr; 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(__('&larr; Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
    702717        <?php do_action('login_footer'); ?>
    703718        </body>
     
    925940        }
    926941
    927         if ( count( $errors->errors ) <= 0 ) {
     942        if ( count( $errors->errors ) <= 0 && !empty( $user->ID ) ) {
    928943            $this->save_psw_hash( $user );
    929944            delete_user_meta( $user->ID, 'll_force_password_change_now');
     
    10651080
    10661081    function ll_update_login_timestamp( $username = '' ) {
    1067         $u = get_userdatabylogin( $username );
     1082        $u = get_user_by( 'login', $username );
    10681083        $uid = $u->ID;
    10691084        if ( intval($uid) <= 0) return;
     
    15291544        }
    15301545
    1531         $userdata = get_userdatabylogin($username);
     1546        $userdata = get_user_by( 'login', $username );
    15321547
    15331548        if ( !$userdata ) {
  • login-lock/trunk/readme.txt

    r391825 r497049  
    33Donate link: https://wpsecurity.net/wordpress-security-login-lock/
    44Tags: login, security
    5 Requires at least: 2.5
    6 Tested up to: 3.1.3
    7 Stable Tag: 2.2.3
     5Requires at least: 3.2
     6Tested up to: 3.3.1
     7Stable Tag: 2.2.4
    88
    99Enforces strong password policies; provides emergency lockdown features; monitors login attempts; blocks hacker IP addresses; and logs out idle users.
     
    7272== Changelog ==
    7373
     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
    7480= 2.2.3 =
    7581* 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.