WordPress.org

Making WordPress.org

Changeset 6795


Ignore:
Timestamp:
02/27/2018 12:16:58 PM (3 years ago)
Author:
dd32
Message:

2FA: Fix a PHP notice during login where $_GET['action'] is not set.

H/T ocean90.
See #77.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-two-factor/wporg-two-factor.php

    r6794 r6795  
    7878        if ( $login_host === $_SERVER['HTTP_HOST']  ) {
    7979            if ( '/wp-login.php' == substr( $_SERVER['REQUEST_URI'], 0, 13 ) ) {
    80                 if ( $_POST || 'backup_2fa' == $_REQUEST['action'] || 'validate_2fa' == $_REQUEST['action'] ) {
     80                if ( $_POST || ( isset( $_REQUEST['action'] ) && ( 'backup_2fa' == $_REQUEST['action'] || 'validate_2fa' == $_REQUEST['action'] ) ) ) {
    8181                    return $user_id;
    8282                }
Note: See TracChangeset for help on using the changeset viewer.