Plugin Directory

Changeset 830737


Ignore:
Timestamp:
12/31/2013 10:48:08 AM (12 years ago)
Author:
Henrik.Schack
Message:

Prevent PHP notices when using app password login

File:
1 edited

Legend:

Unmodified
Added
Removed
  • google-authenticator/trunk/google-authenticator.php

    r830429 r830737  
    184184       
    185185        // Get the verification code entered by the user trying to login
    186         $otp = trim( $_POST[ 'googleotp' ] );
    187    
     186        if ( !empty( $_POST['googleotp'] )) { // Prevent PHP notices when using app password login
     187            $otp = trim( $_POST[ 'googleotp' ] );
     188        } else {
     189            $otp = '';
     190        }
    188191        // Valid code ?
    189192        if ( $this->verify( $GA_secret, $otp, $GA_relaxedmode ) ) {
Note: See TracChangeset for help on using the changeset viewer.