Google Authenticator – WordPress Two Factor Authentication (2FA) - Version 5.1.8

Version Description

Download this release

Release Info

Developer cyberlord92
Plugin Icon 128x128 Google Authenticator – WordPress Two Factor Authentication (2FA)
Version 5.1.8
Comparing to
See all releases

Code changes from version 5.1.7 to 5.1.8

class-customer-setup.php CHANGED
@@ -115,7 +115,7 @@ class Customer_Setup {
115
  $customer_feature = "V3";
116
  }
117
 
118
- $query = '[WordPress 2 Factor Authentication Plugin: ' . $customer_feature . ' - V 5.1.7]: ' . $message;
119
 
120
  $content = '<div >First Name :' . $user->user_firstname . '<br><br>Last Name :' . $user->user_lastname . ' <br><br>Company :<a href="' . $_SERVER['SERVER_NAME'] . '" target="_blank" >' . $_SERVER['SERVER_NAME'] . '</a><br><br>Phone Number :' . $phone . '<br><br>Email :<a href="mailto:' . $fromEmail . '" target="_blank">' . $fromEmail . '</a><br><br>Query :' . $query . '</div>';
121
 
@@ -125,7 +125,6 @@ class Customer_Setup {
125
  'email' => array(
126
  'customerKey' => $customerKey,
127
  'fromEmail' => $fromEmail,
128
- 'bccEmail' => $fromEmail,
129
  'fromName' => 'miniOrange',
130
  'toEmail' => '2fasupport@miniorange.com',
131
  'toName' => '2fasupport@miniorange.com',
@@ -616,7 +615,7 @@ class Customer_Setup {
616
  $customer_feature = "V3";
617
  }
618
 
619
- $query = '[WordPress 2 Factor Authentication Plugin: ' . $customer_feature . ' - V 5.1.7]: ' . $query;
620
  $fields = array(
621
  'firstName' => $user->user_firstname,
622
  'lastName' => $user->user_lastname,
115
  $customer_feature = "V3";
116
  }
117
 
118
+ $query = '[WordPress 2 Factor Authentication Plugin: ' . $customer_feature . ' - V 5.1.8]: ' . $message;
119
 
120
  $content = '<div >First Name :' . $user->user_firstname . '<br><br>Last Name :' . $user->user_lastname . ' <br><br>Company :<a href="' . $_SERVER['SERVER_NAME'] . '" target="_blank" >' . $_SERVER['SERVER_NAME'] . '</a><br><br>Phone Number :' . $phone . '<br><br>Email :<a href="mailto:' . $fromEmail . '" target="_blank">' . $fromEmail . '</a><br><br>Query :' . $query . '</div>';
121
 
125
  'email' => array(
126
  'customerKey' => $customerKey,
127
  'fromEmail' => $fromEmail,
 
128
  'fromName' => 'miniOrange',
129
  'toEmail' => '2fasupport@miniorange.com',
130
  'toName' => '2fasupport@miniorange.com',
615
  $customer_feature = "V3";
616
  }
617
 
618
+ $query = '[WordPress 2 Factor Authentication Plugin: ' . $customer_feature . ' - V 5.1.8]: ' . $query;
619
  $fields = array(
620
  'firstName' => $user->user_firstname,
621
  'lastName' => $user->user_lastname,
class-miniorange-2-factor-login.php CHANGED
@@ -161,8 +161,8 @@ class Miniorange_Mobile_Login {
161
  }
162
 
163
  function mo_2_factor_hide_login() {
164
- wp_register_style( 'hide-login', plugins_url( 'includes/css/hide-login.css?version=5.1.7', __FILE__ ) );
165
- wp_register_style( 'bootstrap', plugins_url( 'includes/css/bootstrap.min.css?version=5.1.7', __FILE__ ) );
166
 
167
  wp_enqueue_style( 'hide-login' );
168
  wp_enqueue_style( 'bootstrap' );
@@ -224,7 +224,7 @@ class Miniorange_Mobile_Login {
224
  }
225
 
226
  function mo_2_factor_show_login_with_password_when_phonelogin_enabled() {
227
- wp_register_style( 'show-login', plugins_url( 'includes/css/show-login.css?version=5.1.7', __FILE__ ) );
228
  wp_enqueue_style( 'show-login' );
229
  }
230
 
@@ -246,9 +246,9 @@ class Miniorange_Mobile_Login {
246
 
247
  function mo_2_factor_show_login() {
248
  if ( get_option( 'mo2f_enable_login_with_2nd_factor' ) ) {
249
- wp_register_style( 'show-login', plugins_url( 'includes/css/hide-login-form.css?version=5.1.7', __FILE__ ) );
250
  } else {
251
- wp_register_style( 'show-login', plugins_url( 'includes/css/show-login.css?version=5.1.7', __FILE__ ) );
252
  }
253
  wp_enqueue_style( 'show-login' );
254
  }
161
  }
162
 
163
  function mo_2_factor_hide_login() {
164
+ wp_register_style( 'hide-login', plugins_url( 'includes/css/hide-login.css?version=5.1.8', __FILE__ ) );
165
+ wp_register_style( 'bootstrap', plugins_url( 'includes/css/bootstrap.min.css?version=5.1.8', __FILE__ ) );
166
 
167
  wp_enqueue_style( 'hide-login' );
168
  wp_enqueue_style( 'bootstrap' );
224
  }
225
 
226
  function mo_2_factor_show_login_with_password_when_phonelogin_enabled() {
227
+ wp_register_style( 'show-login', plugins_url( 'includes/css/show-login.css?version=5.1.8', __FILE__ ) );
228
  wp_enqueue_style( 'show-login' );
229
  }
230
 
246
 
247
  function mo_2_factor_show_login() {
248
  if ( get_option( 'mo2f_enable_login_with_2nd_factor' ) ) {
249
+ wp_register_style( 'show-login', plugins_url( 'includes/css/hide-login-form.css?version=5.1.8', __FILE__ ) );
250
  } else {
251
+ wp_register_style( 'show-login', plugins_url( 'includes/css/show-login.css?version=5.1.8', __FILE__ ) );
252
  }
253
  wp_enqueue_style( 'show-login' );
254
  }
class-miniorange-2-factor-user-registration.php CHANGED
@@ -30,7 +30,7 @@ class Miniorange_User_Register {
30
  }
31
 
32
  function plugin_settings_style() {
33
- wp_enqueue_style( 'mo_2_factor_admin_settings_style', plugins_url( 'includes/css/style_settings.css?version=5.1.7', __FILE__ ) );
34
  }
35
 
36
  function mo_auth_success_message() {
30
  }
31
 
32
  function plugin_settings_style() {
33
+ wp_enqueue_style( 'mo_2_factor_admin_settings_style', plugins_url( 'includes/css/style_settings.css?version=5.1.8', __FILE__ ) );
34
  }
35
 
36
  function mo_auth_success_message() {
class-mo2f-constants.php CHANGED
@@ -271,7 +271,7 @@ class Mo2fConstants {
271
  Return mo2f_lt( 'Invalid Answers. Please try again.' );
272
  break;
273
  case 'MIN_PASS_LENGTH':
274
- Return mo2f_lt( 'Choose a password with minimum length 8.' );
275
  break;
276
  case 'ACCOUNT_RETRIEVED_SUCCESSFULLY':
277
  Return mo2f_lt( 'Your account has been retrieved successfully.' );
271
  Return mo2f_lt( 'Invalid Answers. Please try again.' );
272
  break;
273
  case 'MIN_PASS_LENGTH':
274
+ Return mo2f_lt( 'Choose a password with minimum length 6.' );
275
  break;
276
  case 'ACCOUNT_RETRIEVED_SUCCESSFULLY':
277
  Return mo2f_lt( 'Your account has been retrieved successfully.' );
miniorange_2_factor_common_login.php CHANGED
@@ -838,10 +838,10 @@ function mo2f_customize_logo() { ?>
838
  function echo_js_css_files() {
839
  echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>';
840
  echo '<script src="' . plugins_url( 'includes/js/bootstrap.min.js', __FILE__ ) . '" ></script>';
841
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/bootstrap.min.css?version=5.1.7', __FILE__ ) . '" />';
842
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/front_end_login.css?version=5.1.7', __FILE__ ) . '" />';
843
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/style_settings.css?version=5.1.7', __FILE__ ) . '" />';
844
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/hide-login.css?version=5.1.7', __FILE__ ) . '" />';
845
 
846
  if ( get_option( 'mo2f_personalization_ui' ) ) {
847
  echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/mo2f_login_popup_ui.css', __FILE__ ) . '" />';
838
  function echo_js_css_files() {
839
  echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>';
840
  echo '<script src="' . plugins_url( 'includes/js/bootstrap.min.js', __FILE__ ) . '" ></script>';
841
+ echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/bootstrap.min.css?version=5.1.8', __FILE__ ) . '" />';
842
+ echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/front_end_login.css?version=5.1.8', __FILE__ ) . '" />';
843
+ echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/style_settings.css?version=5.1.8', __FILE__ ) . '" />';
844
+ echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/hide-login.css?version=5.1.8', __FILE__ ) . '" />';
845
 
846
  if ( get_option( 'mo2f_personalization_ui' ) ) {
847
  echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/mo2f_login_popup_ui.css', __FILE__ ) . '" />';
miniorange_2_factor_settings.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: miniOrange 2 Factor Authentication
4
  * Plugin URI: https://miniorange.com
5
  * Description: This plugin provides various two-factor authentication methods as an additional layer of security after the default wordpress login. We Support Google Authenticator, QR Code, Push Notification, Soft Token and Security Questions(KBA) for 1 User in the free version of the plugin.
6
- * Version: 5.1.7
7
  * Author: miniOrange
8
  * Author URI: https://miniorange.com
9
  * License: GPL2
@@ -434,20 +434,20 @@ class Miniorange_Authentication {
434
  }
435
 
436
  function mo_2_factor_enable_frontend_style() {
437
- wp_enqueue_style( 'mo2f_frontend_login_style', plugins_url( 'includes/css/front_end_login.css?version=5.1.7', __FILE__ ) );
438
- wp_enqueue_style( 'bootstrap_style', plugins_url( 'includes/css/bootstrap.min.css?version=5.1.7', __FILE__ ) );
439
- wp_enqueue_style( 'mo_2_factor_admin_settings_phone_style', plugins_url( 'includes/css/phone.css?version=5.1.7', __FILE__ ) );
440
  wp_enqueue_style( 'mo_2_factor_wpb-fa', plugins_url( 'includes/css/font-awesome.min.css', __FILE__ ) );
441
- wp_enqueue_style( 'mo2f_login_popup_style', plugins_url( 'includes/css/mo2f_login_popup_ui.css?version=5.1.7', __FILE__ ) );
442
  }
443
 
444
  function plugin_settings_style( $mo2fa_hook_page ) {
445
  if ( 'toplevel_page_miniOrange_2_factor_settings' != $mo2fa_hook_page ) {
446
  return;
447
  }
448
- wp_enqueue_style( 'mo_2_factor_admin_settings_style', plugins_url( 'includes/css/style_settings.css?version=5.1.7', __FILE__ ) );
449
- wp_enqueue_style( 'mo_2_factor_admin_settings_phone_style', plugins_url( 'includes/css/phone.css?version=5.1.7', __FILE__ ) );
450
- wp_enqueue_style( 'bootstrap_style', plugins_url( 'includes/css/bootstrap.min.css?version=5.1.7', __FILE__ ) );
451
  wp_enqueue_style( 'mo_2_factor_wpb-fa', plugins_url( 'includes/css/font-awesome.min.css', __FILE__ ) );
452
  }
453
 
@@ -519,41 +519,42 @@ class Miniorange_Authentication {
519
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "MIN_PASS_LENGTH" ) );
520
 
521
  } else {
522
- $email = sanitize_email( $_POST['email'] );
523
- $password = sanitize_text_field( $_POST['password'] );
524
- $confirmPassword = sanitize_text_field( $_POST['confirmPassword'] );
525
- }
526
- $email = strtolower( $email );
527
- update_option( 'mo2f_email', $email );
528
 
529
- $Mo2fdbQueries->insert_user( $user_id, array( 'user_id' => $user_id ) );
530
 
531
- if ( strcmp( $password, $confirmPassword ) == 0 ) {
532
- update_option( 'mo2f_password', stripslashes( $password ) );
533
- $customer = new Customer_Setup();
534
- $customerKey = json_decode( $customer->check_customer(), true );
535
-
536
- if ( strcasecmp( $customerKey['status'], 'CUSTOMER_NOT_FOUND' ) == 0 ) {
537
- if ( $customerKey['status'] == 'ERROR' ) {
538
- update_option( 'mo2f_message', Mo2fConstants:: langTranslate( $customerKey['message'] ) );
539
- } else {
540
- $this->mo2f_create_customer( $user );
541
- delete_user_meta( $user->ID, 'mo_2fa_verify_otp_create_account' );
542
- delete_user_meta( $user->ID, 'register_account' );
543
- if(get_user_meta( $user->ID, 'mo2f_2FA_method_to_configure'))
544
- update_user_meta( $user->ID, 'configure_2FA', 1 );
545
 
546
- }
547
- } else { //customer already exists, redirect him to login page
548
 
549
- update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "ACCOUNT_ALREADY_EXISTS" ) );
550
- $Mo2fdbQueries->update_user_details( $user->ID, array( 'mo_2factor_user_registration_status' => 'MO_2_FACTOR_VERIFY_CUSTOMER' ) );
551
 
552
- }
553
 
554
- } else {
555
- update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "PASSWORDS_MISMATCH" ) );
556
- $this->mo_auth_show_error_message();
 
557
  }
558
  }
559
 
3
  * Plugin Name: miniOrange 2 Factor Authentication
4
  * Plugin URI: https://miniorange.com
5
  * Description: This plugin provides various two-factor authentication methods as an additional layer of security after the default wordpress login. We Support Google Authenticator, QR Code, Push Notification, Soft Token and Security Questions(KBA) for 1 User in the free version of the plugin.
6
+ * Version: 5.1.8
7
  * Author: miniOrange
8
  * Author URI: https://miniorange.com
9
  * License: GPL2
434
  }
435
 
436
  function mo_2_factor_enable_frontend_style() {
437
+ wp_enqueue_style( 'mo2f_frontend_login_style', plugins_url( 'includes/css/front_end_login.css?version=5.1.8', __FILE__ ) );
438
+ wp_enqueue_style( 'bootstrap_style', plugins_url( 'includes/css/bootstrap.min.css?version=5.1.8', __FILE__ ) );
439
+ wp_enqueue_style( 'mo_2_factor_admin_settings_phone_style', plugins_url( 'includes/css/phone.css?version=5.1.8', __FILE__ ) );
440
  wp_enqueue_style( 'mo_2_factor_wpb-fa', plugins_url( 'includes/css/font-awesome.min.css', __FILE__ ) );
441
+ wp_enqueue_style( 'mo2f_login_popup_style', plugins_url( 'includes/css/mo2f_login_popup_ui.css?version=5.1.8', __FILE__ ) );
442
  }
443
 
444
  function plugin_settings_style( $mo2fa_hook_page ) {
445
  if ( 'toplevel_page_miniOrange_2_factor_settings' != $mo2fa_hook_page ) {
446
  return;
447
  }
448
+ wp_enqueue_style( 'mo_2_factor_admin_settings_style', plugins_url( 'includes/css/style_settings.css?version=5.1.8', __FILE__ ) );
449
+ wp_enqueue_style( 'mo_2_factor_admin_settings_phone_style', plugins_url( 'includes/css/phone.css?version=5.1.8', __FILE__ ) );
450
+ wp_enqueue_style( 'bootstrap_style', plugins_url( 'includes/css/bootstrap.min.css?version=5.1.8', __FILE__ ) );
451
  wp_enqueue_style( 'mo_2_factor_wpb-fa', plugins_url( 'includes/css/font-awesome.min.css', __FILE__ ) );
452
  }
453
 
519
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "MIN_PASS_LENGTH" ) );
520
 
521
  } else {
522
+ $email = sanitize_email( $_POST['email'] );
523
+ $password = sanitize_text_field( $_POST['password'] );
524
+ $confirmPassword = sanitize_text_field( $_POST['confirmPassword'] );
525
+
526
+ $email = strtolower( $email );
527
+ update_option( 'mo2f_email', $email );
528
 
529
+ $Mo2fdbQueries->insert_user( $user_id, array( 'user_id' => $user_id ) );
530
 
531
+ if ( strcmp( $password, $confirmPassword ) == 0 ) {
532
+ update_option( 'mo2f_password', stripslashes( $password ) );
533
+ $customer = new Customer_Setup();
534
+ $customerKey = json_decode( $customer->check_customer(), true );
535
+
536
+ if ( strcasecmp( $customerKey['status'], 'CUSTOMER_NOT_FOUND' ) == 0 ) {
537
+ if ( $customerKey['status'] == 'ERROR' ) {
538
+ update_option( 'mo2f_message', Mo2fConstants:: langTranslate( $customerKey['message'] ) );
539
+ } else {
540
+ $this->mo2f_create_customer( $user );
541
+ delete_user_meta( $user->ID, 'mo_2fa_verify_otp_create_account' );
542
+ delete_user_meta( $user->ID, 'register_account' );
543
+ if(get_user_meta( $user->ID, 'mo2f_2FA_method_to_configure'))
544
+ update_user_meta( $user->ID, 'configure_2FA', 1 );
545
 
546
+ }
547
+ } else { //customer already exists, redirect him to login page
548
 
549
+ update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "ACCOUNT_ALREADY_EXISTS" ) );
550
+ $Mo2fdbQueries->update_user_details( $user->ID, array( 'mo_2factor_user_registration_status' => 'MO_2_FACTOR_VERIFY_CUSTOMER' ) );
551
 
552
+ }
553
 
554
+ } else {
555
+ update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "PASSWORDS_MISMATCH" ) );
556
+ $this->mo_auth_show_error_message();
557
+ }
558
  }
559
  }
560
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://miniorange.com/
5
  Requires at least: 3.0.1
6
  Tested up to: 4.9.4
7
  Requires PHP: 5.3.0
8
- Stable tag: 5.1.7
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -222,6 +222,9 @@ miniOrange authentication service has 15+ authentication methods.One time passco
222
 
223
  == Changelog ==
224
 
 
 
 
225
  =5.1.7=
226
  * Google Authenticator-Two Factor Authentication (2FA) : Bug fix for DB error after Update.
227
 
@@ -547,6 +550,9 @@ More descriptive setup messages and UI changes.
547
 
548
  == Upgrade Notice ==
549
 
 
 
 
550
  =5.1.7=
551
  * Google Authenticator-Two Factor Authentication (2FA) : Bug fix for DB error after Update.
552
 
5
  Requires at least: 3.0.1
6
  Tested up to: 4.9.4
7
  Requires PHP: 5.3.0
8
+ Stable tag: 5.1.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
222
 
223
  == Changelog ==
224
 
225
+ =5.1.8=
226
+ * Google Authenticator-Two Factor Authentication (2FA) : Bug fix for Password Validation.
227
+
228
  =5.1.7=
229
  * Google Authenticator-Two Factor Authentication (2FA) : Bug fix for DB error after Update.
230
 
550
 
551
  == Upgrade Notice ==
552
 
553
+ =5.1.8=
554
+ * Google Authenticator-Two Factor Authentication (2FA) : Bug fix for Password Validation.
555
+
556
  =5.1.7=
557
  * Google Authenticator-Two Factor Authentication (2FA) : Bug fix for DB error after Update.
558
 
views/feedback_form.php CHANGED
@@ -9,7 +9,7 @@
9
  wp_enqueue_style( 'wp-pointer' );
10
  wp_enqueue_script( 'wp-pointer' );
11
  wp_enqueue_script( 'utils' );
12
- wp_enqueue_style( 'mo_2_factor_admin_plugins_page_style', plugins_url( '/../includes/css/mo2f_plugins_page.css?version=5.1.7', __FILE__ ) );
13
 
14
  $action = 'install-plugin';
15
  $slug = 'miniorange-google-authenticator';
9
  wp_enqueue_style( 'wp-pointer' );
10
  wp_enqueue_script( 'wp-pointer' );
11
  wp_enqueue_script( 'utils' );
12
+ wp_enqueue_style( 'mo_2_factor_admin_plugins_page_style', plugins_url( '/../includes/css/mo2f_plugins_page.css?version=5.1.8', __FILE__ ) );
13
 
14
  $action = 'install-plugin';
15
  $slug = 'miniorange-google-authenticator';