• Hi,

    I have a problem each time I activate WP-members and try to connect as administrator (which account is activated), or with an another account :
    I have the following errors:

    Warning: Attempt to read property "user_pass" on null in /homepages/0/d569550935/htdocs/2022/wp-content/plugins/wp-members/includes/class-wp-members-validation-link.php on line 276
    
    Warning: Attempt to read property "ID" on null in /homepages/0/d569550935/htdocs/2022/wp-content/plugins/wp-members/includes/class-wp-members-validation-link.php on line 276
    
    Fatal error: Uncaught TypeError: hash_equals(): Argument #1 ($known_string) must be of type string, null given in /homepages/0/d569550935/htdocs/2022/wp-includes/pluggable.php:2513 Stack trace: #0 /homepages/0/d569550935/htdocs/2022/wp-includes/pluggable.php(2513): hash_equals(NULL, 'bf4b4787b2b69c6...') #1 /homepages/0/d569550935/htdocs/2022/wp-content/plugins/wp-members/includes/class-wp-members-validation-link.php(276): wp_check_password('XXXXXXXXX...', NULL, NULL) #2 /homepages/0/d569550935/htdocs/2022/wp-includes/class-wp-hook.php(307): WP_Members_Validation_Link->check_validated(NULL, '_Admin', 'XXXXXXXX...') #3 /homepages/0/d569550935/htdocs/2022/wp-includes/plugin.php(191): WP_Hook->apply_filters(NULL, Array) #4 /homepages/0/d569550935/htdocs/2022/wp-includes/pluggable.php(620): apply_filters('authenticate', NULL, 'XXXXX', '@sst&K2KDUT!8(n...') #5 /homepages/0/d569550935/htdocs/2022/wp-includes/user.php(95): wp_authenticate('XXXXX', 'XXXXXXXX...') #6 /homepages/0/d569550935/htdocs/2022/wp-login.php(1221): wp_signon(Array, true) #7 {main} thrown in /homepages/0/d569550935/htdocs/2022/wp-includes/pluggable.php on line 251

    I have unactivated every other plugin that could have a conflict with WP-memebers, but it doesn’t change anything.

    Thanks for your help.
    MB

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter boilloux

    (@boilloux)

    PS : It seems to be a conflict with the plugin WP-Cerber.
    EAch time both are activated, I have this error.

    Plugin Author Chad Butler

    (@cbutlerjr)

    Digging into this, it appears that WP-Cerber hooks into WP’s authenticate filter and returns the $user object as null.

    While that’s one of the possible values of $user in authenticate, it’s not all that common.

    So… the check_validated() function is not expecting a null. It’s checking to see if $user is a WP error (which is commonly what it’s going to be if anything failed the login before this filter).

    The only other time anything like this has ever come up in the last 15 years was with the same plugin but in check_activated() (checking if the user is activated for moderated registration). When it came up then, I updated that function to check for a null, but neglected to consider check_validated() (honestly, I didn’t think about it).

    I’ll update it to also check if $user is null in an update containing some other patches as well. In the meantime, if you want to patch it right away, go to includes/wp-members-validation-link.php and at line 276, locate the following:

    $pass = ( ( ! is_wp_error( $user ) ) && $password ) ? wp_check_password( $password, $user->user_pass, $user->ID ) : false;

    Change it to this:

    $pass = ( ( ! is_wp_error( $user ) ) && ! is_null( $user ) && $password ) ? wp_check_password( $password, $user->user_pass, $user->ID ) : false;

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP-Members login : fatal error once the plugin is activated’ is closed to new replies.