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

Version Description

  • Google Authenticator - Two factor Authentication (2FA, OTP) :
  • Skip-2 factor option removed from inline setup
  • Backup code button will always be shown
  • Added login form and theme fields in trial request form
  • CSS-JS version added for all scripts and styles respectively
  • Autofocus for many input fields and submit form when Enter is hit
Download this release

Release Info

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

Code changes from version 5.6.2 to 5.6.3

api/class-customer-common-setup.php CHANGED
@@ -335,7 +335,7 @@ class Customer_Cloud_Setup {
335
  'mo2f_cSecret'=>MoWpnsConstants::DEFAULT_API_KEY
336
  );
337
 
338
- return $this->mo_2f_remote_call_function($url,$postdata,);
339
  }
340
 
341
  public function mo_2f_remote_call_function($url,$postdata){
335
  'mo2f_cSecret'=>MoWpnsConstants::DEFAULT_API_KEY
336
  );
337
 
338
+ return $this->mo_2f_remote_call_function($url,$postdata);
339
  }
340
 
341
  public function mo_2f_remote_call_function($url,$postdata){
controllers/all_users.php CHANGED
@@ -15,7 +15,7 @@ echo' <table id="mo2f_user_details" class="display" cellspacing="0" width="100%
15
  <th>Role</th>
16
  <th>Method selected</th>
17
  <th>Reset 2-Factor</th>
18
- <th>Unblock User </th>
19
 
20
 
21
  </tr>
15
  <th>Role</th>
16
  <th>Method selected</th>
17
  <th>Reset 2-Factor</th>
18
+
19
 
20
 
21
  </tr>
controllers/change-password.php CHANGED
@@ -8,8 +8,8 @@
8
 
9
  $js_file = plugins_url('wp-security-pro/includes/js/settings_page.js',$mo2f_dirName);
10
 
11
- wp_register_script('mo2f_setting_page_js',$js_file);
12
- wp_register_style( 'mo2f_seetings_style',$css_file);
13
 
14
  include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'change-password.php';
15
  exit;
8
 
9
  $js_file = plugins_url('wp-security-pro/includes/js/settings_page.js',$mo2f_dirName);
10
 
11
+ wp_register_script('mo2f_setting_page_js',$js_file,[],MO2F_VERSION);
12
+ wp_register_style( 'mo2f_seetings_style',$css_file,[],MO2F_VERSION);
13
 
14
  include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'change-password.php';
15
  exit;
controllers/trial.php CHANGED
@@ -27,6 +27,13 @@
27
  $phone = isset($post['mo2f_trial_phone'])? sanitize_text_field($post['mo2f_trial_phone']) : ( $user_phone ? $user_phone : NULL );
28
  $trial_plan = isset($post['mo2f_trial_plan'])? sanitize_text_field($post['mo2f_trial_plan']): NULL;
29
  $authentication_method = isset($post['mo2f_authentication_method'])? sanitize_text_field($post['mo2f_authentication_method']): NULL;
 
 
 
 
 
 
 
30
  for($i = 1; $i <= 3; $i++) {
31
  if(isset( $post[ 'mo2f_number_of_users_' . $i ] ) && !empty($post[ 'mo2f_number_of_users_' . $i ]) || isset( $post[ 'mo2f_number_of_sites_' . $i ]) && !empty($post[ 'mo2f_number_of_sites_' . $i ])){
32
 
@@ -41,7 +48,7 @@
41
  return;
42
  }
43
 
44
- if(empty($email) || empty($phone) || empty($trial_plan) )
45
  {
46
  do_action('wpns_show_message',MoWpnsMessages::showMessage('REQUIRED_FIELDS'),'ERROR');
47
  return;
@@ -65,7 +72,8 @@
65
  $query .= get_option('mo2f_email');
66
  $query .= ' | Users/Sites => ';
67
  $query .= ($number_of_users ?: 'NA') . '/' . ($number_of_sites ?: 'NA');
68
- $query .= ' | Method => ' . $authentication_method . ' ]';
 
69
  $current_user = wp_get_current_user();
70
 
71
 
27
  $phone = isset($post['mo2f_trial_phone'])? sanitize_text_field($post['mo2f_trial_phone']) : ( $user_phone ? $user_phone : NULL );
28
  $trial_plan = isset($post['mo2f_trial_plan'])? sanitize_text_field($post['mo2f_trial_plan']): NULL;
29
  $authentication_method = isset($post['mo2f_authentication_method'])? sanitize_text_field($post['mo2f_authentication_method']): NULL;
30
+ $login_form_name = isset($post['mo2f_trial_login_form'])? sanitize_text_field($post['mo2f_trial_login_form']): NULL;
31
+ $theme_name = isset($post['mo2f_trial_theme'])? sanitize_text_field($post['mo2f_trial_theme']): NULL;
32
+
33
+ if($login_form_name == "Other"){
34
+ $login_form_name = isset($post['mo2f_other_login_form'])? sanitize_text_field($post['mo2f_other_login_form']): NULL;
35
+ }
36
+
37
  for($i = 1; $i <= 3; $i++) {
38
  if(isset( $post[ 'mo2f_number_of_users_' . $i ] ) && !empty($post[ 'mo2f_number_of_users_' . $i ]) || isset( $post[ 'mo2f_number_of_sites_' . $i ]) && !empty($post[ 'mo2f_number_of_sites_' . $i ])){
39
 
48
  return;
49
  }
50
 
51
+ if(empty($email) || empty($phone) || empty($trial_plan) || empty($login_form_name) || empty($theme_name))
52
  {
53
  do_action('wpns_show_message',MoWpnsMessages::showMessage('REQUIRED_FIELDS'),'ERROR');
54
  return;
72
  $query .= get_option('mo2f_email');
73
  $query .= ' | Users/Sites => ';
74
  $query .= ($number_of_users ?: 'NA') . '/' . ($number_of_sites ?: 'NA');
75
+ $query .= ' | Method => ' . $authentication_method;
76
+ $query .= ' | Form/Theme=> ' . $login_form_name . '/' . $theme_name . ' ]';
77
  $current_user = wp_get_current_user();
78
 
79
 
controllers/twofa/mo2fa_common_login.php CHANGED
@@ -20,14 +20,14 @@ function mo2f_collect_device_attributes_handler( $session_id_encrypt,$redirect_t
20
  <p><input type="hidden" id="miniorange_rba_attribures" name="miniorange_rba_attribures" value=""/></p>
21
  <?php
22
  wp_enqueue_script('jquery');
23
- wp_register_script('mo2f_rba_flash',plugins_url( 'includes/js/rba/js/jquery.flash.js', dirname(dirname(dirname(__FILE__))) ));
24
- wp_register_script('mo2f_rba_ua_parser',plugins_url( 'includes/js/rba/js/ua-parser.js', dirname(dirname(dirname(__FILE__))) ));
25
- wp_register_script('mo2f_client',plugins_url( 'includes/js/rba/js/client.js', dirname(dirname(dirname(__FILE__))) ));
26
- wp_register_script('mo2f_device',plugins_url( 'includes/js/rba/js/device_attributes.js', dirname(dirname(dirname(__FILE__))) ));
27
- wp_register_script('mo2f_swfobject',plugins_url( 'includes/js/rba/js/swfobject.js', dirname(dirname(dirname(__FILE__))) ));
28
- wp_register_script('mo2f_font',plugins_url( 'includes/js/rba/js/fontdetect.js', dirname(dirname(dirname(__FILE__))) ));
29
- wp_register_script('mo2f_murmur',plugins_url( 'includes/js/rba/js/murmurhash3.js', dirname(dirname(dirname(__FILE__))) ));
30
- wp_register_script('mo2f_fd',plugins_url( 'includes/js/rba/js/miniorange-fp.js', dirname(dirname(dirname(__FILE__))) ));
31
 
32
  wp_print_scripts( 'jquery');
33
  wp_print_scripts( 'mo2f_rba_flash');
@@ -127,24 +127,38 @@ function miniorange_get_user_role( $user ) {
127
  return $user->roles;
128
  }
129
 
130
- function redirect_user_to( $user, $redirect_to ) {
131
- $roles = $user->roles;
132
- $current_role = array_shift( $roles );
133
- $redirectUrl = isset( $redirect_to ) && ! empty( $redirect_to ) ? $redirect_to : null;
134
- if ( $current_role == 'administrator' ) {
135
- $redirectUrl = empty( $redirectUrl ) ? admin_url() : $redirectUrl;
136
- } else {
137
- $redirectUrl = empty( $redirectUrl ) ? home_url() : $redirectUrl;
138
- }
139
- if(MO2f_Utility::get_index_value('GLOBALS','mo2f_is_ajax_request')){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  $redirect = array(
141
  'redirect' => $redirectUrl,
142
  ) ;
143
 
144
  wp_send_json_success($redirect);
 
 
145
  }
146
- else
147
- wp_redirect( $redirectUrl );
148
  }
149
 
150
 
@@ -1502,10 +1516,10 @@ function mo2f_customize_logo() { ?>
1502
 
1503
  function echo_js_css_files() {
1504
 
1505
- wp_register_style( 'mo2f_style_settings',plugins_url( 'includes/css/twofa_style_settings.css?version=5.5', dirname(dirname(__FILE__))));
1506
  wp_print_styles( 'mo2f_style_settings' );
1507
 
1508
- wp_register_script( 'mo2f_bootstrap_js',plugins_url( 'includes/js/bootstrap.min.js', dirname(dirname(__FILE__)) ) );
1509
  wp_print_scripts( 'jquery' );
1510
  wp_print_scripts( 'mo2f_bootstrap_js');
1511
  }
@@ -1540,14 +1554,14 @@ function mo2f_backup_codes_generate($redirect_to, $session_id_encrypt){
1540
  <meta name="viewport" content="width=device-width, initial-scale=1">
1541
  <?php
1542
 
1543
- wp_register_script( 'mo2f_bootstrap_js', plugins_url('includes/js/bootstrap.min.js', dirname(dirname(__FILE__))) );
1544
  wp_print_scripts( 'jquery' );
1545
  wp_print_scripts('mo2f_bootstrap_js');
1546
 
1547
- wp_register_style('mo2f_bootstrap',plugins_url('includes/css/bootstrap.min.css', dirname(dirname(__FILE__))));
1548
- wp_register_style('mo2f_frontend',plugins_url('includes/css/front_end_login.css', dirname(dirname(__FILE__))));
1549
- wp_register_style('mo2f_style_settings',plugins_url('includes/css/style_settings.css', dirname(dirname(__FILE__))));
1550
- wp_register_style('mo2f_hide_login',plugins_url('includes/css/hide-login.css', dirname(dirname(__FILE__))));
1551
 
1552
  wp_print_styles( 'mo2f_bootstrap');
1553
  wp_print_styles( 'mo2f_frontend');
20
  <p><input type="hidden" id="miniorange_rba_attribures" name="miniorange_rba_attribures" value=""/></p>
21
  <?php
22
  wp_enqueue_script('jquery');
23
+ wp_register_script('mo2f_rba_flash',plugins_url( 'includes/js/rba/js/jquery.flash.js', dirname(dirname(dirname(__FILE__))) ),[],MO2F_VERSION);
24
+ wp_register_script('mo2f_rba_ua_parser',plugins_url( 'includes/js/rba/js/ua-parser.js', dirname(dirname(dirname(__FILE__))) ),[],MO2F_VERSION);
25
+ wp_register_script('mo2f_client',plugins_url( 'includes/js/rba/js/client.js', dirname(dirname(dirname(__FILE__))) ),[],MO2F_VERSION);
26
+ wp_register_script('mo2f_device',plugins_url( 'includes/js/rba/js/device_attributes.js', dirname(dirname(dirname(__FILE__))) ),[],MO2F_VERSION);
27
+ wp_register_script('mo2f_swfobject',plugins_url( 'includes/js/rba/js/swfobject.js', dirname(dirname(dirname(__FILE__))) ),[],MO2F_VERSION);
28
+ wp_register_script('mo2f_font',plugins_url( 'includes/js/rba/js/fontdetect.js', dirname(dirname(dirname(__FILE__))) ),[],MO2F_VERSION);
29
+ wp_register_script('mo2f_murmur',plugins_url( 'includes/js/rba/js/murmurhash3.js', dirname(dirname(dirname(__FILE__))) ),[],MO2F_VERSION);
30
+ wp_register_script('mo2f_fd',plugins_url( 'includes/js/rba/js/miniorange-fp.js', dirname(dirname(dirname(__FILE__))) ),[],MO2F_VERSION);
31
 
32
  wp_print_scripts( 'jquery');
33
  wp_print_scripts( 'mo2f_rba_flash');
127
  return $user->roles;
128
  }
129
 
130
+ function redirect_user_to($user, $redirect_to)
131
+ {
132
+ $roles = $user->roles;
133
+ $current_role = array_shift($roles);
134
+ $redirectUrl = isset($redirect_to) && ! empty($redirect_to) ? $redirect_to : null;
135
+ if(is_multisite()){
136
+ $blog_id = get_current_blog_id();
137
+ if(is_super_admin($user->ID)){
138
+ $redirectUrl = get_blog_option($blog_id,'mo2fa_' . $current_role .'_login_url');
139
+ }elseif(is_user_member_of_blog($user->ID,$blog_id)){
140
+ $redirectUrl = get_blog_option($blog_id,'mo2fa_' . $current_role .'_login_url');
141
+ }else{
142
+ $user_info = get_userdata($user->ID);
143
+ $redirectUrl = get_blog_option($user_info->primary_blog,'mo2fa_' .$current_role . '_login_url');
144
+ }
145
+ }else{
146
+ if ($current_role == 'administrator') {
147
+ $redirectUrl = empty($redirectUrl) ? admin_url() : $redirectUrl;
148
+ } else {
149
+ $redirectUrl = empty($redirectUrl) ? home_url() : $redirectUrl;
150
+ }
151
+ }
152
+
153
+ if (MO2f_Utility::get_index_value('GLOBALS', 'mo2f_is_ajax_request')) {
154
  $redirect = array(
155
  'redirect' => $redirectUrl,
156
  ) ;
157
 
158
  wp_send_json_success($redirect);
159
+ } else {
160
+ wp_redirect($redirectUrl);
161
  }
 
 
162
  }
163
 
164
 
1516
 
1517
  function echo_js_css_files() {
1518
 
1519
+ wp_register_style( 'mo2f_style_settings',plugins_url( 'includes/css/twofa_style_settings.css', dirname(dirname(__FILE__))),[],MO2F_VERSION);
1520
  wp_print_styles( 'mo2f_style_settings' );
1521
 
1522
+ wp_register_script( 'mo2f_bootstrap_js',plugins_url( 'includes/js/bootstrap.min.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION);
1523
  wp_print_scripts( 'jquery' );
1524
  wp_print_scripts( 'mo2f_bootstrap_js');
1525
  }
1554
  <meta name="viewport" content="width=device-width, initial-scale=1">
1555
  <?php
1556
 
1557
+ wp_register_script( 'mo2f_bootstrap_js', plugins_url('includes/js/bootstrap.min.js', dirname(dirname(__FILE__))),[],MO2F_VERSION );
1558
  wp_print_scripts( 'jquery' );
1559
  wp_print_scripts('mo2f_bootstrap_js');
1560
 
1561
+ wp_register_style('mo2f_bootstrap',plugins_url('includes/css/bootstrap.min.css', dirname(dirname(__FILE__))),[],MO2F_VERSION);
1562
+ wp_register_style('mo2f_frontend',plugins_url('includes/css/front_end_login.css', dirname(dirname(__FILE__))),[],MO2F_VERSION);
1563
+ wp_register_style('mo2f_style_settings',plugins_url('includes/css/style_settings.css', dirname(dirname(__FILE__))),[],MO2F_VERSION);
1564
+ wp_register_style('mo2f_hide_login',plugins_url('includes/css/hide-login.css', dirname(dirname(__FILE__))),[],MO2F_VERSION);
1565
 
1566
  wp_print_styles( 'mo2f_bootstrap');
1567
  wp_print_styles( 'mo2f_frontend');
controllers/twofa/mo2fa_inline_registration.php CHANGED
@@ -195,8 +195,21 @@ function prompt_user_to_select_2factor_mthod_inline($current_user_id, $login_sta
195
  </label>
196
  <br>
197
  </span>
198
- <br><a href="#skiptwofactor" style="color:#F4D03F ;font-weight:bold;margin-left:35%;"><?php echo __('Skip Two Factor', 'miniorange-2-factor-authentication'); ?></a>>>
199
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  <?php mo2f_customize_logo() ?>
201
  </div>
202
  </div>
195
  </label>
196
  <br>
197
  </span>
198
+
199
+ <?php
200
+
201
+ $object= new Miniorange_Password_2Factor_Login();
202
+
203
+ if(get_site_option('mo2f_grace_period')=="on" && (!$object->mo2f_is_grace_period_expired($current_user) || $object->mo2f_is_new_user($current_user)))
204
+ { ?><br>
205
+ <?php
206
+ update_site_option('mo2f_user_login_status_'.$current_user->ID,1);
207
+
208
+ ?>
209
+ <a href="#skiptwofactor" style="color:#F4D03F ;font-weight:bold;margin-left:35%;"><?php echo __('Skip Two Factor', 'miniorange-2-factor-authentication'); ?></a>
210
+ <br>
211
+ <?php }?>
212
+
213
  <?php mo2f_customize_logo() ?>
214
  </div>
215
  </div>
controllers/twofa/two_factor_ajax.php CHANGED
@@ -131,6 +131,11 @@ class mo_2f_ajax
131
  else
132
  {
133
  update_site_option('mo2f_grace_period',"off");
 
 
 
 
 
134
  }
135
  wp_send_json('true');
136
  }
@@ -384,7 +389,7 @@ class mo_2f_ajax
384
 
385
  <div style="display:inline;">
386
  <b>Email Address: </b>
387
- <input class="mo2f_table_textbox" style="width:280px;height: 30px;" type="email" name="verify_phone" id="mo2f_contact_info"
388
  value="<?php echo esc_html($user_email) ?>"
389
  title="<?php echo mo2f_lt( 'Enter your email address without any space or dashes' ); ?>"/><br><br>
390
  <input type="button" name="mo2f_send_otp" id="mo2f_send_otp" class="mo2f-modal__btn button"
@@ -398,11 +403,16 @@ class mo_2f_ajax
398
  <input type="hidden" name="mo2f_configure_otp_over_email_validate_nonce"
399
  value="<?php echo esc_html(wp_create_nonce( "mo2f-configure-otp-over-email-validate-nonce" )) ?>"/>
400
  <b><?php echo mo2f_lt( 'Enter One Time Passcode:' ); ?>
401
- <input class="mo2f_table_textbox" style="width:200px;height: 30px;" autofocus="true" type="text" name="mo2f_otp_token" id ="mo2f_otp_token"
402
  placeholder="<?php echo mo2f_lt( 'Enter OTP' ); ?>" style="width:95%;"/></b>
403
  <br><br>
404
  </form><br>
405
-
 
 
 
 
 
406
  <?php
407
  exit;
408
  }
@@ -460,7 +470,7 @@ class mo_2f_ajax
460
  <td style="text-align: end;">
461
  <input class="mo2f_table_textbox_KBA" type="password" name="mo2f_kba_ans1" id="mo2f_kba_ans1"
462
  title="<?php echo mo2f_lt( 'Only alphanumeric letters with special characters(_@.$#&amp;+-) are allowed.' ); ?>"
463
- pattern="(?=\S)[A-Za-z0-9_@.$#&amp;+\-\s]{1,100}" required="true" autofocus="true"
464
  placeholder="<?php echo mo2f_lt( 'Enter your answer' ); ?>"/>
465
  </td>
466
  </tr>
131
  else
132
  {
133
  update_site_option('mo2f_grace_period',"off");
134
+
135
+
136
+ update_site_option('mo2f_inline_registration',1);
137
+
138
+
139
  }
140
  wp_send_json('true');
141
  }
389
 
390
  <div style="display:inline;">
391
  <b>Email Address: </b>
392
+ <input class="mo2f_table_textbox" style="width:280px;height: 30px;" type="text" pattern="[^@\s]+@[^@\s]+\.[^@\s]+" name="verify_phone" id="mo2f_contact_info"
393
  value="<?php echo esc_html($user_email) ?>"
394
  title="<?php echo mo2f_lt( 'Enter your email address without any space or dashes' ); ?>"/><br><br>
395
  <input type="button" name="mo2f_send_otp" id="mo2f_send_otp" class="mo2f-modal__btn button"
403
  <input type="hidden" name="mo2f_configure_otp_over_email_validate_nonce"
404
  value="<?php echo esc_html(wp_create_nonce( "mo2f-configure-otp-over-email-validate-nonce" )) ?>"/>
405
  <b><?php echo mo2f_lt( 'Enter One Time Passcode:' ); ?>
406
+ <input class="mo2f_table_textbox" style="width:200px;height: 30px;" type="text" name="mo2f_otp_token" id ="mo2f_otp_token"
407
  placeholder="<?php echo mo2f_lt( 'Enter OTP' ); ?>" style="width:95%;"/></b>
408
  <br><br>
409
  </form><br>
410
+ <script>
411
+ var input = jQuery("#mo2f_contact_info");
412
+ var len = input.val().length;
413
+ input[0].focus();
414
+ input[0].setSelectionRange(len, len);
415
+ </script>
416
  <?php
417
  exit;
418
  }
470
  <td style="text-align: end;">
471
  <input class="mo2f_table_textbox_KBA" type="password" name="mo2f_kba_ans1" id="mo2f_kba_ans1"
472
  title="<?php echo mo2f_lt( 'Only alphanumeric letters with special characters(_@.$#&amp;+-) are allowed.' ); ?>"
473
+ pattern="(?=\S)[A-Za-z0-9_@.$#&amp;+\-\s]{1,100}" required="true"
474
  placeholder="<?php echo mo2f_lt( 'Enter your answer' ); ?>"/>
475
  </td>
476
  </tr>
handler/recaptcha.php CHANGED
@@ -78,7 +78,7 @@
78
  show_google_recaptcha_form_v3_login();
79
  else if(get_option('mo_wpns_recaptcha_version')=='reCAPTCHA_v2')
80
  {
81
- wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
82
  wp_enqueue_script( 'mo2f_catpcha_js' );
83
 
84
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
@@ -102,7 +102,7 @@
102
  function woocommerce_register_with_captcha(){
103
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_registration'))
104
  {
105
- wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
106
  wp_enqueue_script( 'mo2f_catpcha_js' );
107
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
108
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
@@ -113,7 +113,7 @@
113
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_login'))
114
  {
115
 
116
- wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
117
  wp_enqueue_script( 'mo2f_catpcha_js' );
118
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
119
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#loginform{padding-bottom:20px;}</style>';
@@ -125,7 +125,7 @@
125
  if (!is_user_logged_in()){
126
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_registration'))
127
  {
128
- wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
129
  wp_enqueue_script( 'mo2f_catpcha_js' );
130
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
131
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
78
  show_google_recaptcha_form_v3_login();
79
  else if(get_option('mo_wpns_recaptcha_version')=='reCAPTCHA_v2')
80
  {
81
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL),[],MO2F_VERSION);
82
  wp_enqueue_script( 'mo2f_catpcha_js' );
83
 
84
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
102
  function woocommerce_register_with_captcha(){
103
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_registration'))
104
  {
105
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL),[],MO2F_VERSION);
106
  wp_enqueue_script( 'mo2f_catpcha_js' );
107
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
108
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
113
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_login'))
114
  {
115
 
116
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL),[],MO2F_VERSION);
117
  wp_enqueue_script( 'mo2f_catpcha_js' );
118
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
119
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#loginform{padding-bottom:20px;}</style>';
125
  if (!is_user_logged_in()){
126
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_registration'))
127
  {
128
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL),[],MO2F_VERSION);
129
  wp_enqueue_script( 'mo2f_catpcha_js' );
130
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
131
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
handler/registration.php CHANGED
@@ -22,9 +22,9 @@ class RegistrationHandler
22
  $isRegistered = get_site_option('mo2f_customerkey');
23
  else $isRegistered = 'false';
24
  $javaScript = 'includes/js/custom-form.js';
25
- wp_enqueue_style( 'mo2f_intl_tel_style', $mainDir.'includes/css/phone.css');
26
- wp_enqueue_script( 'mo2f_intl_tel_script',$mainDir.'includes/js/phone.js');
27
- wp_register_script('mo2f_otpVerification',$mainDir.$javaScript);
28
  wp_localize_script('mo2f_otpVerification', 'otpverificationObj',
29
  array('siteURL'=> admin_url( 'admin-ajax.php'),
30
  'nonce'=>wp_create_nonce('ajax-nonce'),
22
  $isRegistered = get_site_option('mo2f_customerkey');
23
  else $isRegistered = 'false';
24
  $javaScript = 'includes/js/custom-form.js';
25
+ wp_enqueue_style( 'mo2f_intl_tel_style', $mainDir.'includes/css/phone.css',[],MO2F_VERSION);
26
+ wp_enqueue_script( 'mo2f_intl_tel_script',$mainDir.'includes/js/phone.js',[],MO2F_VERSION);
27
+ wp_register_script('mo2f_otpVerification',$mainDir.$javaScript,[],MO2F_VERSION);
28
  wp_localize_script('mo2f_otpVerification', 'otpverificationObj',
29
  array('siteURL'=> admin_url( 'admin-ajax.php'),
30
  'nonce'=>wp_create_nonce('ajax-nonce'),
handler/spam.php CHANGED
@@ -34,7 +34,7 @@
34
  echo '<input type="hidden" name="mocomment" />';
35
  if(get_option('mo_wpns_enable_comment_recaptcha'))
36
  {
37
- wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
38
  wp_enqueue_script( 'mo2f_catpcha_js' );
39
  echo '<div class="g-recaptcha" data-sitekey="'.get_option('mo_wpns_recaptcha_site_key').'"></div>';
40
  }
34
  echo '<input type="hidden" name="mocomment" />';
35
  if(get_option('mo_wpns_enable_comment_recaptcha'))
36
  {
37
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL),[],MO2F_VERSION);
38
  wp_enqueue_script( 'mo2f_catpcha_js' );
39
  echo '<div class="g-recaptcha" data-sitekey="'.get_option('mo_wpns_recaptcha_site_key').'"></div>';
40
  }
handler/twofa/setup_twofa.php CHANGED
@@ -133,7 +133,7 @@
133
  );
134
  $two_factor_methods_video = array(
135
  "Security Questions" => "https://www.youtube.com/watch?v=pXPqQ047o-0",
136
- "Google Authenticator" => "https://www.youtube.com/watch?v=_nkMCkxLcIs",
137
  "miniOrange Authenticator" => "https://www.youtube.com/watch?v=oRaGtKxouiI",
138
  "Email Verification" => "https://www.youtube.com/watch?v=OacJWBYx_AE",
139
  "miniOrange Soft Token" => "https://www.youtube.com/watch?v=9HV8V4f80k8",
@@ -732,7 +732,7 @@ function display_customer_registration_forms($user){
732
  </script>
733
 
734
  <?php
735
- wp_register_script( 'mo2f_bootstrap_js',plugins_url( 'includes/js/bootstrap.min.js', dirname(dirname(__FILE__)) ) );
736
  wp_print_scripts( 'mo2f_bootstrap_js' );
737
  }
738
 
133
  );
134
  $two_factor_methods_video = array(
135
  "Security Questions" => "https://www.youtube.com/watch?v=pXPqQ047o-0",
136
+ "Google Authenticator" => "https://www.youtube.com/watch?v=6je2iARqrcs",
137
  "miniOrange Authenticator" => "https://www.youtube.com/watch?v=oRaGtKxouiI",
138
  "Email Verification" => "https://www.youtube.com/watch?v=OacJWBYx_AE",
139
  "miniOrange Soft Token" => "https://www.youtube.com/watch?v=9HV8V4f80k8",
732
  </script>
733
 
734
  <?php
735
+ wp_register_script( 'mo2f_bootstrap_js',plugins_url( 'includes/js/bootstrap.min.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION);
736
  wp_print_scripts( 'mo2f_bootstrap_js' );
737
  }
738
 
handler/twofa/two_fa_constants.php CHANGED
@@ -289,7 +289,9 @@ class Mo2fConstants {
289
  case 'INTERNET_CONNECTIVITY_ERROR';
290
  Return mo2f_lt( 'Unable to generate backup codes. Please check your internet and try again.' );
291
  break;
292
-
 
 
293
  case 'RESET_DUO_CONFIGURATON':
294
  Return mo2f_lt( 'Your Duo configuration has been reset successfully.' );
295
  break;
289
  case 'INTERNET_CONNECTIVITY_ERROR';
290
  Return mo2f_lt( 'Unable to generate backup codes. Please check your internet and try again.' );
291
  break;
292
+ case 'TRANSIENT_ACTIVE';
293
+ Return mo2f_lt( 'Please try again after some time.' );
294
+ break;
295
  case 'RESET_DUO_CONFIGURATON':
296
  Return mo2f_lt( 'Your Duo configuration has been reset successfully.' );
297
  break;
handler/twofa/two_fa_login.php CHANGED
@@ -164,20 +164,20 @@ class Miniorange_Mobile_Login {
164
 
165
  function custom_login_enqueue_scripts() {
166
  wp_enqueue_script( 'jquery' );
167
- $bootstrappath = plugins_url( 'includes/css/bootstrap.min.css?version='.MO2F_VERSION.'', dirname(dirname(__FILE__)) );
168
  $bootstrappath = str_replace('/handler/includes/css', '/includes/css', $bootstrappath);
169
- wp_enqueue_style( 'bootstrap_script', $bootstrappath );
170
- wp_enqueue_script( 'bootstrap_script', plugins_url( 'includes/js/bootstrap.min.js', dirname(dirname(__FILE__ ))) );
171
  }
172
 
173
  function mo_2_factor_hide_login() {
174
- $bootstrappath = plugins_url( 'includes/css/bootstrap.min.css?version='.MO2F_VERSION.'', dirname(dirname(__FILE__)) );
175
  $bootstrappath = str_replace('/handler/includes/css', '/includes/css', $bootstrappath);
176
  $hidepath = plugins_url( 'includes/css/hide-login-form.css?version=5.5.7', dirname(dirname(__FILE__)) );
177
  $hidepath = str_replace('/handler/includes/css', '/includes/css', $hidepath);
178
 
179
- wp_register_style( 'hide-login', $hidepath );
180
- wp_register_style( 'bootstrap', $bootstrappath );
181
  wp_enqueue_style( 'hide-login' );
182
  wp_enqueue_style( 'bootstrap' );
183
 
@@ -270,7 +270,7 @@ class Miniorange_Mobile_Login {
270
  }
271
 
272
  function mo_2_factor_show_login_with_password_when_phonelogin_enabled() {
273
- wp_register_style( 'show-login', plugins_url( 'includes/css/show-login.css?version=5.5.7', dirname(dirname(__FILE__ ))) );
274
  wp_enqueue_style( 'show-login' );
275
  }
276
 
@@ -296,9 +296,9 @@ class Miniorange_Mobile_Login {
296
  $showpath = plugins_url( 'includes/css/show-login.css?version=5.5.7', dirname(dirname(__FILE__ )));
297
 
298
  if ( get_option( 'mo2f_enable_login_with_2nd_factor' ) ) {
299
- wp_register_style( 'show-login', $hidepath );
300
  } else {
301
- wp_register_style( 'show-login', $showpath );
302
  }
303
  wp_enqueue_style( 'show-login' );
304
  }
164
 
165
  function custom_login_enqueue_scripts() {
166
  wp_enqueue_script( 'jquery' );
167
+ $bootstrappath = plugins_url( 'includes/css/bootstrap.min.css', dirname(dirname(__FILE__)) );
168
  $bootstrappath = str_replace('/handler/includes/css', '/includes/css', $bootstrappath);
169
+ wp_enqueue_style( 'bootstrap_script', $bootstrappath,[],MO2F_VERSION );
170
+ wp_enqueue_script( 'bootstrap_script', plugins_url( 'includes/js/bootstrap.min.js', dirname(dirname(__FILE__ ))),[],MO2F_VERSION );
171
  }
172
 
173
  function mo_2_factor_hide_login() {
174
+ $bootstrappath = plugins_url( 'includes/css/bootstrap.min.css', dirname(dirname(__FILE__)) );
175
  $bootstrappath = str_replace('/handler/includes/css', '/includes/css', $bootstrappath);
176
  $hidepath = plugins_url( 'includes/css/hide-login-form.css?version=5.5.7', dirname(dirname(__FILE__)) );
177
  $hidepath = str_replace('/handler/includes/css', '/includes/css', $hidepath);
178
 
179
+ wp_register_style( 'hide-login', $hidepath,[],MO2F_VERSION );
180
+ wp_register_style( 'bootstrap', $bootstrappath,[],MO2F_VERSION );
181
  wp_enqueue_style( 'hide-login' );
182
  wp_enqueue_style( 'bootstrap' );
183
 
270
  }
271
 
272
  function mo_2_factor_show_login_with_password_when_phonelogin_enabled() {
273
+ wp_register_style( 'show-login', plugins_url( 'includes/css/show-login.css', dirname(dirname(__FILE__ ))),[],MO2F_VERSION );
274
  wp_enqueue_style( 'show-login' );
275
  }
276
 
296
  $showpath = plugins_url( 'includes/css/show-login.css?version=5.5.7', dirname(dirname(__FILE__ )));
297
 
298
  if ( get_option( 'mo2f_enable_login_with_2nd_factor' ) ) {
299
+ wp_register_style( 'show-login', $hidepath,[],MO2F_VERSION );
300
  } else {
301
+ wp_register_style( 'show-login', $showpath,[],MO2F_VERSION );
302
  }
303
  wp_enqueue_style( 'show-login' );
304
  }
handler/twofa/two_fa_pass2login.php CHANGED
@@ -528,7 +528,7 @@ class Miniorange_Password_2Factor_Login {
528
  update_user_meta($user_id,'mo2f_otp_token',$otpToken);
529
  update_user_meta($user_id,'mo2f_telegram_time',time());
530
  update_user_meta($user_id,'mo2f_temp_chatID',$chatID);
531
- $url = 'https://sitestats.xecurify.com/teleTest/send_otp.php';
532
  $postdata = array( 'mo2f_otp_token' => $otpToken,
533
  'mo2f_chatid' => $chatID
534
  );
@@ -1113,9 +1113,9 @@ function create_user_in_miniOrange($current_user_id,$email,$currentMethod)
1113
  $redirect_to = esc_url_raw($_POST['redirect_to']);
1114
  $session_id_encrypt = sanitize_text_field($session_id_encrypt);
1115
  $user_id = MO2f_Utility::mo2f_get_transient($session_id_encrypt, 'mo2f_current_user_id');
1116
-
1117
-
1118
- $Mo2fdbQueries->update_user_details( $user_id, array('mo2f_2factor_enable_2fa_byusers' => 0) );
1119
 
1120
  $this->mo2fa_pass2login($redirect_to,$session_id_encrypt);
1121
  }
@@ -2726,12 +2726,12 @@ function check_miniorange_duo_push_validation_failed($POSTED){
2726
  }
2727
  if(class_exists('Theme_My_Login'))
2728
  {
2729
- wp_enqueue_script( 'tmlajax_script', plugins_url( 'includes/js/tmlajax.js', dirname(dirname(__FILE__)) ) );
2730
  wp_localize_script( 'tmlajax_script', 'my_ajax_object',
2731
  array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
2732
  }
2733
  if(class_exists('LoginWithAjax')){
2734
- wp_enqueue_script( 'login_with_ajax_script', plugins_url( 'includes/js/login_with_ajax.js', dirname(dirname(__FILE__))));
2735
  wp_localize_script( 'login_with_ajax_script', 'my_ajax_object',
2736
  array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
2737
  }
@@ -2750,14 +2750,14 @@ function check_miniorange_duo_push_validation_failed($POSTED){
2750
  <p><input type="hidden" id="miniorange_rba_attribures" name="miniorange_rba_attribures" value=""/></p>
2751
  <?php
2752
  wp_enqueue_script( 'jquery');
2753
- wp_enqueue_script( 'flash_script', plugins_url( 'includes/js/rba/js/jquery.flash.js', dirname(dirname(__FILE__)) ) );
2754
- wp_enqueue_script( 'uaparser_script', plugins_url( 'includes/js/rba/js/ua-parser.js', dirname(dirname(__FILE__)) ) );
2755
- wp_enqueue_script( 'client_script', plugins_url( 'includes/js/rba/js/client.js', dirname(dirname(__FILE__)) ) );
2756
- wp_enqueue_script( 'device_script', plugins_url( 'includes/js/rba/js/device_attributes.js', dirname(dirname(__FILE__)) ) );
2757
- wp_enqueue_script( 'swf_script', plugins_url( 'includes/js/rba/js/swfobject.js', dirname(dirname(__FILE__)) ) );
2758
- wp_enqueue_script( 'font_script', plugins_url( 'includes/js/rba/js/fontdetect.js', dirname(dirname(__FILE__)) ) );
2759
- wp_enqueue_script( 'murmur_script', plugins_url( 'includes/js/rba/js/murmurhash3.js', dirname(dirname(__FILE__)) ) );
2760
- wp_enqueue_script( 'miniorange_script', plugins_url( 'includes/js/rba/js/miniorange-fp.js', dirname(dirname(__FILE__)) ) );
2761
  }else{
2762
 
2763
 
@@ -2941,7 +2941,7 @@ function check_miniorange_duo_push_validation_failed($POSTED){
2941
  update_user_meta($user->ID,'mo2f_otp_token',$otpToken);
2942
  update_user_meta($user->ID,'mo2f_telegram_time',time());
2943
 
2944
- $url = 'https://sitestats.xecurify.com/teleTest/send_otp.php';
2945
  $postdata = array( 'mo2f_otp_token' => $otpToken,
2946
  'mo2f_chatid' => $chatID
2947
  );
@@ -3212,7 +3212,7 @@ function check_miniorange_duo_push_validation_failed($POSTED){
3212
  else
3213
  $this->mo2fa_select_method($currentuser, $mo2f_second_factor, $otp_token,$session_id_encrypt, $redirect_to,$kba_configuration_status);
3214
  }
3215
- }else if(!$exceeded && MoWpnsUtility::get_mo2f_db_option('mo2f_inline_registration', 'site_option')){
3216
  $this->mo2fa_inline( $currentuser, $redirect_to, $session_id_encrypt );
3217
 
3218
  } else {
@@ -3500,28 +3500,27 @@ function mo2fa_select_method($currentuser, $mo2f_second_factor, $otp_token,$sess
3500
  {
3501
  MO2f_Utility::mo2f_debug_file('Initiating 2nd factor for email verification'.'User_IP-'.$moWpnsUtility->get_client_ip() .' User_Id-'.$currentuser->ID.' Email-'.$currentuser->user_email);
3502
  $this->miniorange_initiate_2nd_factor($currentuser, null , $redirect_to , null ,$session_id );
3503
- }
3504
- else if(MO2F_IS_ONPREM && !$this->mo2f_is_new_user($currentuser) && !in_array('administrator',$currentuser->roles) && $mo2f_configured_2FA_method=='' && get_option('mo2f_grace_period')=='on' && $this->mo2f_is_grace_period_expired($currentuser) && !$mo2f_transactions->check_alluser_limit_exceeded($currentuser->ID))
3505
- {
3506
- $user_id=get_current_user_id();
3507
- $manager = WP_Session_Tokens::get_instance( $user_id );
3508
- update_site_option('mo2f_is_user_blocked_'.$currentuser->ID,1);
3509
- $manager->destroy_all();
3510
-
3511
- return new WP_Error('account_locked', '<strong>'. __('ERROR','miniorange-2-factor-authentication') . '</strong>: ' . __('Your user account has been locked because you have not configured 2FA within the grace period. Please contact the website administrator to unlock your user and you can configure 2FA.', 'miniorange-2-factor-authentication'));
3512
-
3513
- }
3514
- else
3515
- {
3516
- $twofactor_transactions = new Mo2fDB;
3517
- $exceeded = $twofactor_transactions->check_alluser_limit_exceeded($currentuser->ID);
3518
- if ( get_site_option('mo2fa_'.$currentuser->roles[0]) && $exceeded==false )
3519
- {
3520
  if(get_site_option('mo2f_grace_period')=='on')
3521
- {
3522
- update_site_option('mo2f_user_login_status_'.$currentuser->ID,true);
3523
- }
3524
- }
 
 
 
 
3525
  if ( empty($_POST[ 'mo2f_use_backup_code' ]) && empty( $_POST['mo_softtoken'] ) && MoWpnsUtility::get_mo2f_db_option('mo2f_enable_2fa_prompt_on_login_page', 'get_option') && $mo2f_configured_2FA_method && !get_option('mo2f_remember_device') && (($mo2f_configured_2FA_method == 'Google Authenticator') ||($mo2f_configured_2FA_method == 'miniOrange Soft Token') || ($mo2f_configured_2FA_method =='Authy Authenticator')) && get_option('mo2fa_administrator'))
3526
  {
3527
  $currentuser = wp_authenticate_username_password( $user, $username, $password );
@@ -3621,7 +3620,7 @@ function mo2fa_select_method($currentuser, $mo2f_second_factor, $otp_token,$sess
3621
  }
3622
  else
3623
  {
3624
- update_site_option('mo2f_grace_period_status_'.$currentuser->ID,strtotime(current_datetime()->format('h:ia M d Y')));
3625
  return true;
3626
  }
3627
  }
528
  update_user_meta($user_id,'mo2f_otp_token',$otpToken);
529
  update_user_meta($user_id,'mo2f_telegram_time',time());
530
  update_user_meta($user_id,'mo2f_temp_chatID',$chatID);
531
+ $url = esc_url(MoWpnsConstants::TELEGRAM_OTP_LINK);
532
  $postdata = array( 'mo2f_otp_token' => $otpToken,
533
  'mo2f_chatid' => $chatID
534
  );
1113
  $redirect_to = esc_url_raw($_POST['redirect_to']);
1114
  $session_id_encrypt = sanitize_text_field($session_id_encrypt);
1115
  $user_id = MO2f_Utility::mo2f_get_transient($session_id_encrypt, 'mo2f_current_user_id');
1116
+ $currentuser=get_user_by('id',$user_id);
1117
+
1118
+ $Mo2fdbQueries->update_user_details( $user_id, array('mo2f_2factor_enable_2fa_byusers' => 1) );
1119
 
1120
  $this->mo2fa_pass2login($redirect_to,$session_id_encrypt);
1121
  }
2726
  }
2727
  if(class_exists('Theme_My_Login'))
2728
  {
2729
+ wp_enqueue_script( 'tmlajax_script', plugins_url( 'includes/js/tmlajax.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION );
2730
  wp_localize_script( 'tmlajax_script', 'my_ajax_object',
2731
  array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
2732
  }
2733
  if(class_exists('LoginWithAjax')){
2734
+ wp_enqueue_script( 'login_with_ajax_script', plugins_url( 'includes/js/login_with_ajax.js', dirname(dirname(__FILE__))),[],MO2F_VERSION);
2735
  wp_localize_script( 'login_with_ajax_script', 'my_ajax_object',
2736
  array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
2737
  }
2750
  <p><input type="hidden" id="miniorange_rba_attribures" name="miniorange_rba_attribures" value=""/></p>
2751
  <?php
2752
  wp_enqueue_script( 'jquery');
2753
+ wp_enqueue_script( 'flash_script', plugins_url( 'includes/js/rba/js/jquery.flash.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION );
2754
+ wp_enqueue_script( 'uaparser_script', plugins_url( 'includes/js/rba/js/ua-parser.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION );
2755
+ wp_enqueue_script( 'client_script', plugins_url( 'includes/js/rba/js/client.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION );
2756
+ wp_enqueue_script( 'device_script', plugins_url( 'includes/js/rba/js/device_attributes.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION );
2757
+ wp_enqueue_script( 'swf_script', plugins_url( 'includes/js/rba/js/swfobject.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION );
2758
+ wp_enqueue_script( 'font_script', plugins_url( 'includes/js/rba/js/fontdetect.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION );
2759
+ wp_enqueue_script( 'murmur_script', plugins_url( 'includes/js/rba/js/murmurhash3.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION );
2760
+ wp_enqueue_script( 'miniorange_script', plugins_url( 'includes/js/rba/js/miniorange-fp.js', dirname(dirname(__FILE__)) ),[],MO2F_VERSION );
2761
  }else{
2762
 
2763
 
2941
  update_user_meta($user->ID,'mo2f_otp_token',$otpToken);
2942
  update_user_meta($user->ID,'mo2f_telegram_time',time());
2943
 
2944
+ $url = esc_url(MoWpnsConstants::TELEGRAM_OTP_LINK);
2945
  $postdata = array( 'mo2f_otp_token' => $otpToken,
2946
  'mo2f_chatid' => $chatID
2947
  );
3212
  else
3213
  $this->mo2fa_select_method($currentuser, $mo2f_second_factor, $otp_token,$session_id_encrypt, $redirect_to,$kba_configuration_status);
3214
  }
3215
+ }else if(!$exceeded && (MoWpnsUtility::get_mo2f_db_option('mo2f_inline_registration', 'site_option') || $this->mo2f_is_grace_period_expired($currentuser) )){
3216
  $this->mo2fa_inline( $currentuser, $redirect_to, $session_id_encrypt );
3217
 
3218
  } else {
3500
  {
3501
  MO2f_Utility::mo2f_debug_file('Initiating 2nd factor for email verification'.'User_IP-'.$moWpnsUtility->get_client_ip() .' User_Id-'.$currentuser->ID.' Email-'.$currentuser->user_email);
3502
  $this->miniorange_initiate_2nd_factor($currentuser, null , $redirect_to , null ,$session_id );
3503
+ }
3504
+
3505
+ else
3506
+ {
3507
+
3508
+ if($this->mo2f_is_new_user($currentuser))
3509
+ {
3510
+
3511
+ $twofactor_transactions = new Mo2fDB;
3512
+ $exceeded = $twofactor_transactions->check_alluser_limit_exceeded($currentuser->ID);
3513
+ if ( get_site_option('mo2fa_'.$currentuser->roles[0]) && $exceeded==false )
3514
+ {
 
 
 
 
 
3515
  if(get_site_option('mo2f_grace_period')=='on')
3516
+ {
3517
+ update_site_option('mo2f_user_login_status_'.$currentuser->ID,1);
3518
+ update_site_option('mo2f_grace_period_status_'.$currentuser->ID,strtotime(current_datetime()->format('h:ia M d Y')));
3519
+ }
3520
+ }
3521
+
3522
+ }
3523
+
3524
  if ( empty($_POST[ 'mo2f_use_backup_code' ]) && empty( $_POST['mo_softtoken'] ) && MoWpnsUtility::get_mo2f_db_option('mo2f_enable_2fa_prompt_on_login_page', 'get_option') && $mo2f_configured_2FA_method && !get_option('mo2f_remember_device') && (($mo2f_configured_2FA_method == 'Google Authenticator') ||($mo2f_configured_2FA_method == 'miniOrange Soft Token') || ($mo2f_configured_2FA_method =='Authy Authenticator')) && get_option('mo2fa_administrator'))
3525
  {
3526
  $currentuser = wp_authenticate_username_password( $user, $username, $password );
3620
  }
3621
  else
3622
  {
3623
+
3624
  return true;
3625
  }
3626
  }
handler/twofa/two_fa_settings.php CHANGED
@@ -412,11 +412,11 @@ class Miniorange_Authentication {
412
  }
413
 
414
  function mo_2_factor_enable_frontend_style() {
415
- wp_enqueue_style( 'mo2f_frontend_login_style', plugins_url( 'includes/css/front_end_login.css?version='.MO2F_VERSION.'', __FILE__ ) );
416
- wp_enqueue_style( 'bootstrap_style', plugins_url( 'includes/css/bootstrap.min.css?version='.MO2F_VERSION.'', __FILE__ ) );
417
- wp_enqueue_style( 'mo_2_factor_admin_settings_phone_style', plugins_url( 'includes/css/phone.css?version='.MO2F_VERSION.'', __FILE__ ) );
418
- wp_enqueue_style( 'mo_2_factor_wpb-fa', plugins_url( 'includes/css/font-awesome.min.css', __FILE__ ) );
419
- wp_enqueue_style( 'mo2f_login_popup_style', plugins_url( "includes/css/mo2f_login_popup_ui.css?version=".MO2F_VERSION."", __FILE__ ) );
420
  }
421
 
422
  function plugin_settings_style( $mo2fa_hook_page ) {
@@ -425,12 +425,12 @@ class Miniorange_Authentication {
425
  return;
426
  }
427
 
428
- wp_enqueue_style( 'mo_2_factor_admin_settings_style', plugins_url( 'includes/css/style_settings.css?version='.MO2F_VERSION.'', __FILE__ ) );
429
- wp_enqueue_style( 'mo_2_factor_admin_settings_phone_style', plugins_url( 'includes/css/phone.css?version='.MO2F_VERSION.'', __FILE__ ) );
430
- wp_enqueue_style( 'bootstrap_style', plugins_url( 'includes/css/bootstrap.min.css?version='.MO2F_VERSION.'', __FILE__ ) );
431
- wp_enqueue_style( 'bootstrap_style_ass', plugins_url( 'includes/css/bootstrap-tour-standalone.css?version='.MO2F_VERSION.'', __FILE__ ) );
432
- wp_enqueue_style( 'mo_2_factor_wpb-fa', plugins_url( 'includes/css/font-awesome.min.css', __FILE__ ) );
433
- wp_enqueue_style( 'mo2f_ns_admin_settings_datatable_style', plugins_url('includes/css/jquery.dataTables.min.css', __FILE__));
434
  }
435
 
436
  function plugin_settings_script( $mo2fa_hook_page ) {
@@ -438,10 +438,10 @@ class Miniorange_Authentication {
438
  return;
439
  }
440
  wp_enqueue_script( 'jquery' );
441
- wp_enqueue_script( 'mo_2_factor_admin_settings_phone_script', plugins_url( 'includes/js/phone.js', __FILE__ ) );
442
- wp_enqueue_script( 'bootstrap_script', plugins_url( 'includes/js/bootstrap.min.js', __FILE__ ) );
443
- wp_enqueue_script( 'bootstrap_script_hehe', plugins_url( 'includes/js/bootstrap-tour-standalone.min.js', __FILE__ ) );
444
- wp_enqueue_script( 'mo2f_ns_admin_datatable_script', plugins_url('includes/js/jquery.dataTables.min.js', __FILE__ ), array('jquery'));
445
 
446
  }
447
  public function mo2f_setup_wizard_footer() {
@@ -475,11 +475,11 @@ class Miniorange_Authentication {
475
 
476
  private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $footer = '' ) {
477
 
478
- wp_register_script('mo2f_qr_code_js',plugins_url( "/includes/jquery-qrcode/jquery-qrcode.js", dirname(dirname(__FILE__ ))),[],MO2F_VERSION);
479
- wp_register_script('mo2f_qr_code_minjs',plugins_url( "/includes/jquery-qrcode/jquery-qrcode.min.js", dirname(dirname(__FILE__ ))),[],MO2F_VERSION);
480
- wp_register_script('mo2f_phone_js',plugins_url( "/includes/js/phone.js", dirname(dirname(__FILE__ ))),[],MO2F_VERSION);
481
  wp_register_style( 'mo_2fa_admin_setupWizard' , plugins_url('includes/css/setup-wizard.css', dirname(dirname(__FILE__)) ) ,[],MO2F_VERSION);
482
- wp_register_style('mo2f_phone_css',plugins_url('includes/css/phone.css', dirname(dirname(__FILE__))));
483
  $contact_url = 'https://wordpress.org/plugins/miniorange-2-factor-authentication/';
484
  echo '<head>';
485
  wp_print_scripts( 'mo2f_qr_code_js' );
@@ -605,7 +605,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
605
  <table class="mo_wpns_settings_table mo2f_width_80">
606
  <tr>
607
  <td><b><font color="#FF0000">*</font>Email:</b></td>
608
- <td><input style="padding: 4px;" class="mo_wpns_table_textbox" type="email" id="mo2f_email" name="email"
609
  required placeholder="person@example.com" /></td>
610
  </tr>
611
 
@@ -640,7 +640,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
640
  <table class="mo_wpns_settings_table mo2f_width_80">
641
  <tr>
642
  <td><b><font color="#FF0000">*</font>Email:</b></td>
643
- <td><input style="padding: 4px;" class="mo_wpns_table_textbox" type="email" id="mo2f_email_login" name="email"
644
  required placeholder="person@example.com" /></td>
645
  </tr>
646
  <tr>
@@ -783,6 +783,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
783
  stepElement.classList.remove("mo2f-setup-wizard-timeline-step-active");
784
  document.getElementById('mo2f-setup-settings-error-loading-area3').style.display = "none";
785
  document.getElementById('mo2f-setup-settings-error-loading-area1').style.display = "block";
 
786
 
787
  }
788
  });
@@ -806,11 +807,28 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
806
  jQuery('a[href=\"#mo2f_account_exist\"]').click(function (e) {
807
  document.getElementById('mo2f_registration_form').style.display = "none";
808
  document.getElementById('mo2f_login_form').style.display = "block";
 
 
 
 
 
 
 
 
 
 
 
 
809
  document.getElementById('mo2f_next_step2').value = 'Login and Continue';
 
810
  });
811
 
812
  jQuery('a[href=\"#mo2f_register_new_account\"]').click(function (e) {
813
  document.getElementById('mo2f_registration_form').style.display = "block";
 
 
 
 
814
  document.getElementById('mo2f_login_form').style.display = "none";
815
  document.getElementById('mo2f_next_step2').value = 'Create Account and Continue';
816
  });
@@ -922,6 +940,8 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
922
  var stepElement = document.getElementById("mo2f-setup-wizard-step3");
923
  stepElement.className += " mo2f-setup-wizard-timeline-step-active";
924
  document.getElementById('mo2f-setup-settings-error-loading-area2').style.display = "none";
 
 
925
  jQuery('#mo2f-setup-settings-error-loading-area3').css('display','block');
926
 
927
  var ajax_url = "<?php echo admin_url('admin-ajax.php'); ?>";
@@ -966,6 +986,25 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
966
  });
967
 
968
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
969
 
970
  });
971
  }
@@ -1047,10 +1086,37 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1047
  else
1048
  element.style.display = "none";
1049
  });
1050
-
 
 
 
 
 
 
 
1051
  }
1052
  else if(selected_2FA_method =='OTP Over Email')
1053
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1054
  jQuery('#mo2f_send_otp').click(function(e){
1055
  document.getElementById('mo2f_loader').style.display = "block";
1056
  document.getElementById('mo2f-setup-wizard-settings-area').className = ' overlay';
@@ -1089,6 +1155,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1089
 
1090
  }
1091
  });
 
1092
 
1093
  });
1094
  }
@@ -1098,7 +1165,14 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1098
  var mo_option_to_hide1;
1099
  //hidden element in dropdown list 2
1100
  var mo_option_to_hide2;
1101
-
 
 
 
 
 
 
 
1102
  jQuery('#mo2f_kbaquestion_1').change(function(){
1103
  list = 1;
1104
  var list_selected = document.getElementById("mo2f_kbaquestion_" + list).selectedIndex;
@@ -1142,6 +1216,18 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1142
  else if(selected_2FA_method == 'OTP Over SMS')
1143
  {
1144
  jQuery('#mo2f-setup-settings-error-loading-area2').css('display','block');
 
 
 
 
 
 
 
 
 
 
 
 
1145
  }
1146
 
1147
 
@@ -2600,6 +2686,8 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2600
 
2601
  if ( MO2f_Utility::mo2f_check_number_length( $otpToken ) ) {
2602
  $email = $Mo2fdbQueries->get_user_detail( 'mo2f_user_email', $user->ID );
 
 
2603
  $twofactor_transactions = new Mo2fDB;
2604
  $exceeded = $twofactor_transactions->check_alluser_limit_exceeded($user_id);
2605
 
@@ -2624,6 +2712,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2624
  delete_user_meta( $user->ID, 'configure_2FA' );
2625
 
2626
  $Mo2fdbQueries->update_user_details( $user->ID, array(
 
2627
  'mo2f_GoogleAuthenticator_config_status' => true,
2628
  'mo2f_AuthyAuthenticator_config_status' => false,
2629
  'mo2f_configured_2FA_method' => "Google Authenticator",
@@ -2817,6 +2906,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2817
  $kba_a3 = addcslashes( stripslashes( $kba_a3 ), '"\\' );
2818
 
2819
  $email = $Mo2fdbQueries->get_user_detail( 'mo2f_user_email', $user->ID );
 
2820
  $kba_registration = new Two_Factor_Setup();
2821
  $kba_reg_reponse = json_decode( $kba_registration->register_kba_details( $email, $kba_q1, $kba_a1, $kba_q2, $kba_a2, $kba_q3, $kba_a3, $user->ID ), true );
2822
  if ( json_last_error() == JSON_ERROR_NONE ) {
@@ -2843,6 +2933,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2843
  delete_user_meta( $user->ID, 'configure_2FA' );
2844
 
2845
  $Mo2fdbQueries->update_user_details( $user->ID, array(
 
2846
  'mo2f_SecurityQuestions_config_status' => true,
2847
  'mo2f_configured_2FA_method' => "Security Questions",
2848
  'mo_2factor_user_registration_status' => "MO_2_FACTOR_PLUGIN_SETTINGS"
@@ -2960,7 +3051,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2960
  update_user_meta($user->ID,'mo2f_otp_token',$otpToken);
2961
  update_user_meta($user->ID,'mo2f_telegram_time',time());
2962
 
2963
- $url = 'https://sitestats.xecurify.com/teleTest/send_otp.php';
2964
  $postdata = array( 'mo2f_otp_token' => $otpToken,
2965
  'mo2f_chatid' => $chatID
2966
  );
@@ -3000,7 +3091,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
3000
 
3001
  return $error;
3002
  } else {
3003
- $phone = sanitize_text_field( $_POST['verify_phone'] );
3004
 
3005
  if ( MO2f_Utility::mo2f_check_empty_or_null( $phone ) ) {
3006
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "INVALID_ENTRY" ) );
@@ -3659,7 +3750,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
3659
  update_user_meta($user->ID,'mo2f_otp_token',$otpToken);
3660
  update_user_meta($user->ID,'mo2f_telegram_time',time());
3661
 
3662
- $url = 'https://sitestats.xecurify.com/teleTest/send_otp.php';
3663
  $postdata = array( 'mo2f_otp_token' => $otpToken,
3664
  'mo2f_chatid' => $chatID
3665
  );
@@ -3831,6 +3922,12 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
3831
 
3832
  $codes = MO2f_Utility::mo2f_mail_and_download_codes();
3833
 
 
 
 
 
 
 
3834
  if($codes == 'InternetConnectivityError')
3835
  {
3836
  update_option( 'mo2f_message', Mo2fConstants::langTranslate("INTERNET_CONNECTIVITY_ERROR"));
412
  }
413
 
414
  function mo_2_factor_enable_frontend_style() {
415
+ wp_enqueue_style( 'mo2f_frontend_login_style', plugins_url( 'includes/css/front_end_login.css', __FILE__ ),[],MO2F_VERSION );
416
+ wp_enqueue_style( 'bootstrap_style', plugins_url( 'includes/css/bootstrap.min.css', __FILE__ ),[],MO2F_VERSION );
417
+ wp_enqueue_style( 'mo_2_factor_admin_settings_phone_style', plugins_url( 'includes/css/phone.css', __FILE__ ),[],MO2F_VERSION );
418
+ wp_enqueue_style( 'mo_2_factor_wpb-fa', plugins_url( 'includes/css/font-awesome.min.css', __FILE__ ),[],MO2F_VERSION );
419
+ wp_enqueue_style( 'mo2f_login_popup_style', plugins_url( "includes/css/mo2f_login_popup_ui.css", __FILE__ ),[],MO2F_VERSION );
420
  }
421
 
422
  function plugin_settings_style( $mo2fa_hook_page ) {
425
  return;
426
  }
427
 
428
+ wp_enqueue_style( 'mo_2_factor_admin_settings_style', plugins_url( 'includes/css/style_settings.css', __FILE__ ),[],MO2F_VERSION );
429
+ wp_enqueue_style( 'mo_2_factor_admin_settings_phone_style', plugins_url( 'includes/css/phone.css', __FILE__ ),[],MO2F_VERSION );
430
+ wp_enqueue_style( 'bootstrap_style', plugins_url( 'includes/css/bootstrap.min.css', __FILE__ ),[],MO2F_VERSION );
431
+ wp_enqueue_style( 'bootstrap_style_ass', plugins_url( 'includes/css/bootstrap-tour-standalone.css', __FILE__ ),[],MO2F_VERSION );
432
+ wp_enqueue_style( 'mo_2_factor_wpb-fa', plugins_url( 'includes/css/font-awesome.min.css', __FILE__ ),[],MO2F_VERSION );
433
+ wp_enqueue_style( 'mo2f_ns_admin_settings_datatable_style', plugins_url('includes/css/jquery.dataTables.min.css', __FILE__),[],MO2F_VERSION);
434
  }
435
 
436
  function plugin_settings_script( $mo2fa_hook_page ) {
438
  return;
439
  }
440
  wp_enqueue_script( 'jquery' );
441
+ wp_enqueue_script( 'mo_2_factor_admin_settings_phone_script', plugins_url( 'includes/js/phone.js', __FILE__ ),[],MO2F_VERSION );
442
+ wp_enqueue_script( 'bootstrap_script', plugins_url( 'includes/js/bootstrap.min.js', __FILE__ ),[],MO2F_VERSION );
443
+ wp_enqueue_script( 'bootstrap_script_hehe', plugins_url( 'includes/js/bootstrap-tour-standalone.min.js', __FILE__ ),[],MO2F_VERSION );
444
+ wp_enqueue_script( 'mo2f_ns_admin_datatable_script', plugins_url('includes/js/jquery.dataTables.min.js', __FILE__ ), array('jquery'),MO2F_VERSION);
445
 
446
  }
447
  public function mo2f_setup_wizard_footer() {
475
 
476
  private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $footer = '' ) {
477
 
478
+ wp_register_script('mo2f_qr_code_js',plugins_url( '/includes/jquery-qrcode/jquery-qrcode.js', dirname(dirname(__FILE__ ))),[],MO2F_VERSION);
479
+ wp_register_script('mo2f_qr_code_minjs',plugins_url( '/includes/jquery-qrcode/jquery-qrcode.min.js', dirname(dirname(__FILE__ ))),[],MO2F_VERSION);
480
+ wp_register_script('mo2f_phone_js',plugins_url( '/includes/js/phone.js', dirname(dirname(__FILE__ ))),[],MO2F_VERSION);
481
  wp_register_style( 'mo_2fa_admin_setupWizard' , plugins_url('includes/css/setup-wizard.css', dirname(dirname(__FILE__)) ) ,[],MO2F_VERSION);
482
+ wp_register_style('mo2f_phone_css',plugins_url('includes/css/phone.css', dirname(dirname(__FILE__))),[],MO2F_VERSION);
483
  $contact_url = 'https://wordpress.org/plugins/miniorange-2-factor-authentication/';
484
  echo '<head>';
485
  wp_print_scripts( 'mo2f_qr_code_js' );
605
  <table class="mo_wpns_settings_table mo2f_width_80">
606
  <tr>
607
  <td><b><font color="#FF0000">*</font>Email:</b></td>
608
+ <td><input style="padding: 4px;" class="mo_wpns_table_textbox" type="text" pattern="[^@\s]+@[^@\s]+\.[^@\s]+" id="mo2f_email" name="email"
609
  required placeholder="person@example.com" /></td>
610
  </tr>
611
 
640
  <table class="mo_wpns_settings_table mo2f_width_80">
641
  <tr>
642
  <td><b><font color="#FF0000">*</font>Email:</b></td>
643
+ <td><input style="padding: 4px;" class="mo_wpns_table_textbox" type="email" id="mo2f_email_login" autofocus="true" name="email"
644
  required placeholder="person@example.com" /></td>
645
  </tr>
646
  <tr>
783
  stepElement.classList.remove("mo2f-setup-wizard-timeline-step-active");
784
  document.getElementById('mo2f-setup-settings-error-loading-area3').style.display = "none";
785
  document.getElementById('mo2f-setup-settings-error-loading-area1').style.display = "block";
786
+ jQuery("#mo2f_next_step1").focus();
787
 
788
  }
789
  });
807
  jQuery('a[href=\"#mo2f_account_exist\"]').click(function (e) {
808
  document.getElementById('mo2f_registration_form').style.display = "none";
809
  document.getElementById('mo2f_login_form').style.display = "block";
810
+ var input = jQuery("#mo2f_password_login");
811
+ var len = input.val().length;
812
+ input[0].focus();
813
+ input[0].setSelectionRange(len, len);
814
+ jQuery("#mo2f_password_login" ).keypress(function(e){
815
+ if (e.which == 13) {
816
+ e.preventDefault();
817
+ jQuery("#mo2f_next_step2").click();
818
+ }
819
+
820
+ });
821
+
822
  document.getElementById('mo2f_next_step2').value = 'Login and Continue';
823
+ jQuery("#mo2f_otp_token").focus();
824
  });
825
 
826
  jQuery('a[href=\"#mo2f_register_new_account\"]').click(function (e) {
827
  document.getElementById('mo2f_registration_form').style.display = "block";
828
+ var input = jQuery("#mo2f_email");
829
+ var len = input.val().length;
830
+ input[0].focus();
831
+ input[0].setSelectionRange(len, len);
832
  document.getElementById('mo2f_login_form').style.display = "none";
833
  document.getElementById('mo2f_next_step2').value = 'Create Account and Continue';
834
  });
940
  var stepElement = document.getElementById("mo2f-setup-wizard-step3");
941
  stepElement.className += " mo2f-setup-wizard-timeline-step-active";
942
  document.getElementById('mo2f-setup-settings-error-loading-area2').style.display = "none";
943
+
944
+ jQuery("#mo2f_otp_token").focus();
945
  jQuery('#mo2f-setup-settings-error-loading-area3').css('display','block');
946
 
947
  var ajax_url = "<?php echo admin_url('admin-ajax.php'); ?>";
986
  });
987
 
988
  });
989
+
990
+ jQuery("#mo2f_otp_token").keypress(function(e){
991
+ if (e.which == 13) {
992
+ e.preventDefault();
993
+ jQuery("#mo2f_next_step3").click();
994
+ }
995
+
996
+ });
997
+ jQuery("#mo2f_contact_info").keypress(function(e){
998
+ if (e.which == 13) {
999
+ e.preventDefault();
1000
+ jQuery("#mo2f_send_otp").click();
1001
+ jQuery("#mo2f_otp_token").focus();
1002
+ }
1003
+
1004
+ });
1005
+
1006
+
1007
+
1008
 
1009
  });
1010
  }
1086
  else
1087
  element.style.display = "none";
1088
  });
1089
+ jQuery("#mo2f_google_auth_code").focus();
1090
+ jQuery("#mo2f_google_auth_code").keypress(function(e){
1091
+ if (e.which == 13) {
1092
+ e.preventDefault();
1093
+ jQuery("#mo2f_next_step3").click();
1094
+ }
1095
+
1096
+ });
1097
  }
1098
  else if(selected_2FA_method =='OTP Over Email')
1099
+ {
1100
+
1101
+ var input = jQuery("#mo2f_contact_info");
1102
+ var len = input.val().length;
1103
+ input[0].focus();
1104
+ input[0].setSelectionRange(len, len);
1105
+ jQuery("#mo2f_contact_info" ).keypress(function(e){
1106
+ if (e.which == 13) {
1107
+ e.preventDefault();
1108
+ jQuery("#mo2f_send_otp").click();
1109
+ jQuery("#mo2f_otp_token").focus();
1110
+ }
1111
+
1112
+ });
1113
+ jQuery("#mo2f_otp_token" ).keypress(function(e){
1114
+ if (e.which == 13) {
1115
+ e.preventDefault();
1116
+ jQuery("#mo2f_next_step3").click();
1117
+ }
1118
+
1119
+ });
1120
  jQuery('#mo2f_send_otp').click(function(e){
1121
  document.getElementById('mo2f_loader').style.display = "block";
1122
  document.getElementById('mo2f-setup-wizard-settings-area').className = ' overlay';
1155
 
1156
  }
1157
  });
1158
+ jQuery("#mo2f_otp_token").focus();
1159
 
1160
  });
1161
  }
1165
  var mo_option_to_hide1;
1166
  //hidden element in dropdown list 2
1167
  var mo_option_to_hide2;
1168
+ jQuery("#mo2f_kba_ans1").focus();
1169
+ jQuery("#mo2f_kba_ans3").keypress(function(e){
1170
+ if (e.which == 13) {
1171
+ e.preventDefault();
1172
+ jQuery("#mo2f_next_step3").click();
1173
+ }
1174
+
1175
+ });
1176
  jQuery('#mo2f_kbaquestion_1').change(function(){
1177
  list = 1;
1178
  var list_selected = document.getElementById("mo2f_kbaquestion_" + list).selectedIndex;
1216
  else if(selected_2FA_method == 'OTP Over SMS')
1217
  {
1218
  jQuery('#mo2f-setup-settings-error-loading-area2').css('display','block');
1219
+
1220
+ var input = jQuery("#mo2f_email");
1221
+ var len = input.val().length;
1222
+ input[0].focus();
1223
+ input[0].setSelectionRange(len, len);
1224
+ jQuery("#mo2f_confirmPassword").keypress(function(e){
1225
+ if (e.which == 13) {
1226
+ e.preventDefault();
1227
+ jQuery("#mo2f_next_step2").click();
1228
+ }
1229
+
1230
+ });
1231
  }
1232
 
1233
 
2686
 
2687
  if ( MO2f_Utility::mo2f_check_number_length( $otpToken ) ) {
2688
  $email = $Mo2fdbQueries->get_user_detail( 'mo2f_user_email', $user->ID );
2689
+ $user = wp_get_current_user();
2690
+ $email = ($email=='')?$user->user_email:$email;
2691
  $twofactor_transactions = new Mo2fDB;
2692
  $exceeded = $twofactor_transactions->check_alluser_limit_exceeded($user_id);
2693
 
2712
  delete_user_meta( $user->ID, 'configure_2FA' );
2713
 
2714
  $Mo2fdbQueries->update_user_details( $user->ID, array(
2715
+ 'mo2f_user_email' => $email,
2716
  'mo2f_GoogleAuthenticator_config_status' => true,
2717
  'mo2f_AuthyAuthenticator_config_status' => false,
2718
  'mo2f_configured_2FA_method' => "Google Authenticator",
2906
  $kba_a3 = addcslashes( stripslashes( $kba_a3 ), '"\\' );
2907
 
2908
  $email = $Mo2fdbQueries->get_user_detail( 'mo2f_user_email', $user->ID );
2909
+ $email = ($email=='')?$user->user_email:$email;
2910
  $kba_registration = new Two_Factor_Setup();
2911
  $kba_reg_reponse = json_decode( $kba_registration->register_kba_details( $email, $kba_q1, $kba_a1, $kba_q2, $kba_a2, $kba_q3, $kba_a3, $user->ID ), true );
2912
  if ( json_last_error() == JSON_ERROR_NONE ) {
2933
  delete_user_meta( $user->ID, 'configure_2FA' );
2934
 
2935
  $Mo2fdbQueries->update_user_details( $user->ID, array(
2936
+ 'mo2f_user_email' => $email,
2937
  'mo2f_SecurityQuestions_config_status' => true,
2938
  'mo2f_configured_2FA_method' => "Security Questions",
2939
  'mo_2factor_user_registration_status' => "MO_2_FACTOR_PLUGIN_SETTINGS"
3051
  update_user_meta($user->ID,'mo2f_otp_token',$otpToken);
3052
  update_user_meta($user->ID,'mo2f_telegram_time',time());
3053
 
3054
+ $url = esc_url(MoWpnsConstants::TELEGRAM_OTP_LINK);
3055
  $postdata = array( 'mo2f_otp_token' => $otpToken,
3056
  'mo2f_chatid' => $chatID
3057
  );
3091
 
3092
  return $error;
3093
  } else {
3094
+ $phone = sanitize_text_field( $_POST['phone'] );
3095
 
3096
  if ( MO2f_Utility::mo2f_check_empty_or_null( $phone ) ) {
3097
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "INVALID_ENTRY" ) );
3750
  update_user_meta($user->ID,'mo2f_otp_token',$otpToken);
3751
  update_user_meta($user->ID,'mo2f_telegram_time',time());
3752
 
3753
+ $url = esc_url(MoWpnsConstants::TELEGRAM_OTP_LINK);
3754
  $postdata = array( 'mo2f_otp_token' => $otpToken,
3755
  'mo2f_chatid' => $chatID
3756
  );
3922
 
3923
  $codes = MO2f_Utility::mo2f_mail_and_download_codes();
3924
 
3925
+ if($codes == 'TransientActive')
3926
+ {
3927
+ update_option( 'mo2f_message', Mo2fConstants::langTranslate("TRANSIENT_ACTIVE"));
3928
+ $this->mo_auth_show_error_message();
3929
+ }
3930
+
3931
  if($codes == 'InternetConnectivityError')
3932
  {
3933
  update_option( 'mo2f_message', Mo2fConstants::langTranslate("INTERNET_CONNECTIVITY_ERROR"));
handler/twofa/two_fa_utility.php CHANGED
@@ -739,16 +739,31 @@ class MO2f_Utility {
739
  $mo2f_user_email = $currentuser->user_email;
740
  }
741
  $generate_backup_code = new Customer_Cloud_Setup();
 
 
 
 
742
  $codes=$generate_backup_code->mo_2f_generate_backup_codes($mo2f_user_email, site_url());
743
 
744
- if($codes == 'LimitReached'|| $codes == 'UserLimitReached' || $codes == 'AllUsed' || $codes == 'invalid_request' || $codes == 'InternetConnectivityError')
745
- return $codes;
 
 
 
 
 
 
 
746
 
747
  $codes = explode(' ', $codes);
748
  $result = MO2f_Utility::mo2f_email_backup_codes($codes, $mo2f_user_email);
749
  update_user_meta($id, 'mo_backup_code_generated', 1);
750
  update_user_meta($id, 'mo_backup_code_downloaded', 1);
 
 
751
  MO2f_Utility::mo2f_download_backup_codes($id, $codes);
 
 
752
  }
753
 
754
 
739
  $mo2f_user_email = $currentuser->user_email;
740
  }
741
  $generate_backup_code = new Customer_Cloud_Setup();
742
+ if(get_transient("mo2f_generate_backup_code")=="1")
743
+ {
744
+ return "TransientActive";
745
+ }
746
  $codes=$generate_backup_code->mo_2f_generate_backup_codes($mo2f_user_email, site_url());
747
 
748
+
749
+ if($codes == 'LimitReached'|| $codes == 'UserLimitReached' || $codes == 'AllUsed' || $codes == 'invalid_request' )
750
+ {
751
+ update_user_meta($id, 'mo_backup_code_limit_reached',1);
752
+ return $codes;
753
+ }
754
+ if($codes == 'InternetConnectivityError' )
755
+ return $codes;
756
+
757
 
758
  $codes = explode(' ', $codes);
759
  $result = MO2f_Utility::mo2f_email_backup_codes($codes, $mo2f_user_email);
760
  update_user_meta($id, 'mo_backup_code_generated', 1);
761
  update_user_meta($id, 'mo_backup_code_downloaded', 1);
762
+
763
+ set_transient("mo2f_generate_backup_code","1",30);
764
  MO2f_Utility::mo2f_download_backup_codes($id, $codes);
765
+
766
+
767
  }
768
 
769
 
handler/user-profile-2fa.php CHANGED
@@ -58,7 +58,7 @@ $two_factor_methods_descriptions = array(
58
  "Hardware Token" => "Enter the One Time Passcode on your Hardware Token to login."
59
  );
60
  global $mainDir;
61
- wp_enqueue_style( 'mo2f_user-profile_style', $mainDir.'/includes/css/user-profile.css');
62
  ?>
63
  <h3><?php esc_html_e( 'Set 2-Factor Authentication', 'miniorange 2-factor-authentication' ); ?></h3>
64
  <table class="form-table" id="mo2fa_form-table-user-profile">
@@ -102,7 +102,7 @@ wp_enqueue_style( 'mo2f_user-profile_style', $mainDir.'/includes/css/user-profi
102
  <input type="hidden" name='method' id="method" value="NONE">
103
  <input type="hidden" name='mo2f_configuration_status' id="mo2f_configuration_status" value="Configuration">
104
  <?php
105
- wp_enqueue_script( 'user-profile-2fa-script', $mainDir.'/includes/js/user-profile-twofa.js');
106
 
107
  function methods_on_user_profile($method,$user,$transient_id){
108
  global $Mo2fdbQueries,$mainDir;
@@ -199,8 +199,8 @@ wp_enqueue_style( 'mo2f_user-profile_style', $mainDir.'/includes/css/user-profi
199
  update_user_meta( $user->ID, 'mo2f_google_auth', json_encode( $mo2f_google_auth ) );
200
  $otpcode = $gauth_obj->getCode($ga_secret);
201
  $data = isset($mo2f_google_auth) ? $mo2f_google_auth['ga_qrCode'] : null;
202
- wp_enqueue_script( 'mo_wpns_qrcode_script', $mainDir.'/includes/jquery-qrcode/jquery-qrcode.js' );
203
- wp_enqueue_script( 'mo_wpns_min_qrcode_script', $mainDir.'/includes/jquery-qrcode/jquery-qrcode.min.js');
204
  echo '<div class="mo2f_gauth_column mo2f_gauth_left" >';
205
  echo '<div class="mo2f_gauth" data-qrcode='.esc_html($data).'></div>';
206
  echo '</div>';
58
  "Hardware Token" => "Enter the One Time Passcode on your Hardware Token to login."
59
  );
60
  global $mainDir;
61
+ wp_enqueue_style( 'mo2f_user-profile_style', $mainDir.'/includes/css/user-profile.css',[],MO2F_VERSION);
62
  ?>
63
  <h3><?php esc_html_e( 'Set 2-Factor Authentication', 'miniorange 2-factor-authentication' ); ?></h3>
64
  <table class="form-table" id="mo2fa_form-table-user-profile">
102
  <input type="hidden" name='method' id="method" value="NONE">
103
  <input type="hidden" name='mo2f_configuration_status' id="mo2f_configuration_status" value="Configuration">
104
  <?php
105
+ wp_enqueue_script( 'user-profile-2fa-script', $mainDir.'/includes/js/user-profile-twofa.js',[],MO2F_VERSION);
106
 
107
  function methods_on_user_profile($method,$user,$transient_id){
108
  global $Mo2fdbQueries,$mainDir;
199
  update_user_meta( $user->ID, 'mo2f_google_auth', json_encode( $mo2f_google_auth ) );
200
  $otpcode = $gauth_obj->getCode($ga_secret);
201
  $data = isset($mo2f_google_auth) ? $mo2f_google_auth['ga_qrCode'] : null;
202
+ wp_enqueue_script( 'mo_wpns_qrcode_script', $mainDir.'/includes/jquery-qrcode/jquery-qrcode.js',[],MO2F_VERSION );
203
+ wp_enqueue_script( 'mo_wpns_min_qrcode_script', $mainDir.'/includes/jquery-qrcode/jquery-qrcode.min.js',[],MO2F_VERSION);
204
  echo '<div class="mo2f_gauth_column mo2f_gauth_left" >';
205
  echo '<div class="mo2f_gauth" data-qrcode='.esc_html($data).'></div>';
206
  echo '</div>';
helper/constants.php CHANGED
@@ -12,8 +12,9 @@
12
  const DEFAULT_CUSTOMER_KEY = "16555";
13
  const DEFAULT_API_KEY = "fFd2XcvTGDemZvbw1bcUesNJWEqKbbUq";
14
  const DB_VERSION = 155;
15
- const DB_FEATURE_MAIL = 3;
16
  const SMS_EMAIL_TRANSACTION ="https://plugins.miniorange.com/sms-and-email-transaction-pricing-2fa";
 
17
  const SUPPORT_EMAIL = 'info@xecurify.com';
18
  const REAL_TIME_IP_HOST = 'https://firewall.xecurify.com/';
19
  const GENERATE_BACK_CODE = 'https://sitestats.xecurify.com/backupcodeserviceauthentication';
@@ -32,6 +33,7 @@
32
  const TWO_FACTOR_SETTINGS = 'miniorange-2-factor-authentication/miniorange_2_factor_settings.php';
33
  const OTP_VERIFICATION_SETTINGS = 'miniorange-otp-verification/miniorange_validation_settings.php';
34
  const SOCIAL_LOGIN_SETTINGS = 'miniorange-login-openid/miniorange_openid_sso_settings.php';
 
35
 
36
  //arrays
37
  public static $domains = array('0-mail.com','20email.eu','0815.ru','0815.su','0clickemail.com','0sg.net','0wnd.net','0wnd.org','10mail.org','10minutemail.cf','10minutemail.com','10minutemail.de','10minutemail.ga','10minutemail.gq','10minutemail.ml','123-m.com','12hourmail.com','12minutemail.com','1ce.us','1chuan.com','1mail.ml','1pad.de','1zhuan.com','20mail.in','20mail.it','20minutemail.com','21cn.com','24hourmail.com','2prong.com','30minutemail.com','30minutesmail.com','3126.com','33mail.com','3d-painting.com','3mail.ga','4mail.cf','4mail.ga','4warding.com','4warding.net','4warding.org','50e.info','5mail.cf','5mail.ga','60minutemail.com','675hosting.com','675hosting.net','675hosting.org','6ip.us','6mail.cf','6mail.ga','6mail.ml','6paq.com','6url.com','75hosting.com','75hosting.net','75hosting.org','7days-printing.com','7mail.ga','7mail.ml','7tags.com','8mail.cf','8mail.ga','8mail.ml','99experts.com','9mail.cf','9ox.net','BeefMilk.com','DingBone.com','FudgeRub.com','LookUgly.com','MailScrap.com','SmellFear.com','TempEmail.net','a-bc.net','a45.in','abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com','abusemail.de','abwesend.de','abyssmail.com','ac20mail.in','acentri.com','addcom.de','advantimo.com','afrobacon.com','ag.us.to','agedmail.com','agnitumhost.net','ahk.jp','ajaxapp.net','alivance.com','alpenjodel.de','alphafrau.de','amail.com','amilegit.com','amiri.net','amiriindustries.com','amorki.pl','anappthat.com','ano-mail.net','anonbox.net','anonymail.dk','anonymbox.com','antichef.com','antichef.net','antispam.de','antispam24.de','appixie.com','armyspy.com','asdasd.nl','autosfromus.com','aver.com','azmeil.tk','baldmama.de','baldpapa.de','ballyfinance.com','baxomale.ht.cx','beddly.com','beefmilk.com','betriebsdirektor.de','big1.us','bigmir.net','bigprofessor.so','bigstring.com','bin-wieder-da.de','binkmail.com','bio-muesli.info','bio-muesli.net','bladesmail.net','bleib-bei-mir.de','blockfilter.com','blogmyway.org','bluebottle.com','bobmail.info','bodhi.lawlita.com','bofthew.com','bonbon.net','bootybay.de','boun.cr','bouncr.com','boxformail.in','boxtemp.com.br','brefmail.com','brennendesreich.de','briefemail.com','broadbandninja.com','brokenvalve.com','brokenvalve.org','bsnow.net','bspamfree.org','bu.mintemail.com','buerotiger.de','buffemail.com','bugmenot.com','bumpymail.com','bund.us','bundes-li.ga','burnthespam.info','burstmail.info','buy-24h.net.ru','buyusedlibrarybooks.org','c2.hu','cachedot.net','cashette.com','casualdx.com','cbair.com','ce.mintemail.com','cellurl.com','center-mail.de','centermail.at','centermail.ch','centermail.com','centermail.de','centermail.info','centermail.net','cghost.s-a-d.de','chammy.info','cheatmail.de','chogmail.com','choicemail1.com','chong-mail.com','chong-mail.net','chong-mail.org','chongsoft.org','clixser.com','cmail.com','cmail.net','cmail.org','coldemail.info','consumerriot.com','cool.fr.nf','coole-files.de','correo.blogos.net','cosmorph.com','courriel.fr.nf','courrieltemporaire.com','crapmail.org','crazespaces.pw','crazymailing.com','cubiclink.com','curryworld.de','cust.in','cuvox.de','cyber-matrix.com','dacoolest.com','daintly.com','dandikmail.com','dating4best.net','dayrep.com','dbunker.com','dcemail.com','deadaddress.com','deadchildren.org','deadfake.cf','deadfake.ga','deadfake.ml','deadfake.tk','deadspam.com','deagot.com','dealja.com','despam.it','despammed.com','devnullmail.com','dfgh.net','dharmatel.net','die-besten-bilder.de','die-genossen.de','die-optimisten.de','die-optimisten.net','dieMailbox.de','digital-filestore.de','digitalsanctuary.com','dingbone.com','directbox.com','discard.cf','discard.email','discard.ga','discard.gq','discard.ml','discard.tk','discardmail.*','discardmail.com','discardmail.de','discartmail.com','disposable-email.ml','disposable.cf','disposable.ga','disposable.ml','disposableaddress.com','disposableemailaddresses.com','disposableemailaddresses.emailmiser.com','disposableinbox.com','dispose.it','disposeamail.com','disposemail.com','dispostable.com','divermail.com','dm.w3internet.co.uk','example.com','docmail.cz','dodgeit.com','dodgit.com','dodgit.org','dogit.com','doiea.com','domozmail.com','donemail.ru','dontreg.com','dontsendmespam.de','dontsentmespam.de','dotmsg.com','download-privat.de','drdrb.com','drdrb.net','droplar.com','dropmail.me','duam.net','dudmail.com','dump-email.info','dumpandjunk.com','dumpmail.com','dumpmail.de','dumpyemail.com','duskmail.com','dyndns.org','e-mail.com','e-mail.org','e4ward.com','easytrashmail.com','ee2.pl','eelmail.com','einrot.com','einrot.de','eintagsmail.de','email-fake.cf','email-fake.ga','email-fake.gq','email-fake.ml','email-fake.tk','email.org','email4u.info','email60.com','emailage.cf','emailage.ga','emailage.gq','emailage.ml','emailage.tk','emaildienst.de','emailgo.de','emailias.com','emailigo.de','emailinfive.com','emailisvalid.com','emaillime.com','emailmiser.com','emailproxsy.com','emails.ga','emailsensei.com','emailspam.cf','emailspam.ga','emailspam.gq','emailspam.ml','emailspam.tk','emailtaxi.de','emailtemporanea.net','emailtemporar.ro','emailtemporario.com.br','emailthe.net','emailtmp.com','emailto.de','emailwarden.com','emailx.at.hm','emailxfer.com','emailz.cf','emailz.ga','emailz.gq','emailz.ml','emeil.in','emeil.ir','emil.com','emkei.cf','emkei.ga','emkei.gq','emkei.ml','emkei.tk','emz.net','enterto.com','ephemail.net','etranquil.com','etranquil.net','etranquil.org','evopo.com','example.com','explodemail.com','eyepaste.com','facebook-email.cf','facebook-email.ga','facebook-email.ml','facebookmail.gq','facebookmail.ml','fahr-zur-hoelle.org','fake-mail.cf','fake-mail.ga','fake-mail.ml','fakeinbox.cf','fakeinbox.com','fakeinbox.ga','fakeinbox.ml','fakeinbox.tk','fakeinformation.com','fakemail.fr','fakemailgenerator.com','fakemailz.com','falseaddress.com','fammix.com','fansworldwide.de','fantasymail.de','farifluset.mailexpire.com','fastacura.com','fastchevy.com','fastchrysler.com','fastkawasaki.com','fastmazda.com','fastmitsubishi.com','fastnissan.com','fastsubaru.com','fastsuzuki.com','fasttoyota.com','fastyamaha.com','fatflap.com','fdfdsfds.com','feinripptraeger.de','fettabernett.de','fightallspam.com','fiifke.de','filzmail.com','fishfuse.com','fixmail.tk','fizmail.com','fleckens.hu','flurred.com','flyspam.com','footard.com','forgetmail.com','fornow.eu','fr33mail.info','frapmail.com','free-email.cf','free-email.ga','freemail.ms','freemails.cf','freemails.ga','freemails.ml','freemeilaadressforall.net','freudenkinder.de','freundin.ru','friendlymail.co.uk','fromru.com','front14.org','fuckingduh.com','fudgerub.com','fux0ringduh.com','garliclife.com','gawab.com','gelitik.in','gentlemansclub.de','get-mail.cf','get-mail.ga','get-mail.ml','get-mail.tk','get1mail.com','get2mail.fr','getairmail.cf','getairmail.com','getairmail.ga','getairmail.gq','getairmail.ml','getairmail.tk','getmails.eu','getonemail.com','getonemail.net','ghosttexter.de','girlsundertheinfluence.com','gishpuppy.com','goemailgo.com','gold-profits.info','goldtoolbox.com','golfilla.info','gorillaswithdirtyarmpits.com','gotmail.com','gotmail.net','gotmail.org','gotti.otherinbox.com','gowikibooks.com','gowikicampus.com','gowikicars.com','gowikifilms.com','gowikigames.com','gowikimusic.com','gowikinetwork.com','gowikitravel.com','gowikitv.com','grandmamail.com','grandmasmail.com','great-host.in','greensloth.com','grr.la','gsrv.co.uk','guerillamail.biz','guerillamail.com','guerillamail.net','guerillamail.org','guerrillamail.biz','guerrillamail.com','guerrillamail.de','guerrillamail.info','guerrillamail.net','guerrillamail.org','guerrillamailblock.com','gustr.com','h.mintemail.com','h8s.org','hab-verschlafen.de','habmalnefrage.de','hacccc.com','haltospam.com','harakirimail.com','hartbot.de','hatespam.org','hellodream.mobi','herp.in','herr-der-mails.de','hidemail.de','hidzz.com','hmamail.com','hochsitze.com','home.de','hopemail.biz','hot-mail.cf','hot-mail.ga','hot-mail.gq','hot-mail.ml','hot-mail.tk','hotpop.com','hulapla.de','humn.ws.gy','hush.com','hushmail.com','ich-bin-verrueckt-nach-dir.de','ich-will-net.de','ieatspam.eu','ieatspam.info','ieh-mail.de','ihateyoualot.info','iheartspam.org','ikbenspamvrij.nl','imails.info','imgof.com','imstations.com','inbax.tk','inbox.si','inbox2.info','inboxalias.com','inboxclean.com','inboxclean.org','inboxproxy.com','incognitomail.com','incognitomail.net','incognitomail.org','inerted.com','inmail24.com','insorg-mail.info','instant-mail.de','instantemailaddress.com','ipoo.org','irish2me.com','iroid.com','ist-allein.info','ist-einmalig.de','ist-ganz-allein.de','ist-willig.de','iwi.net','izmail.net','jetable.com','jetable.de','jetable.fr.nf','jetable.net','jetable.org','jetfix.ee','jetzt-bin-ich-dran.com','jn-club.de','jnxjn.com','jobbikszimpatizans.hu','jourrapide.com','jsrsolutions.com','junk1e.com','junkmail.com','junkmail.ga','junkmail.gq','kaffeeschluerfer.com','kaffeeschluerfer.de','kasmail.com','kaspop.com','keepmymail.com','killmail.com','killmail.net','kimsdisk.com','kinglibrary.net','kingsq.ga','kir.ch.tc','klassmaster.com','klassmaster.net','klzlk.com','kommespaeter.de','kook.ml','koszmail.pl','krim.ws','kuh.mu','kulturbetrieb.info','kurzepost.de','l33r.eu','labetteraverouge.at','lackmail.net','lags.us','landmail.co','lass-es-geschehen.de','lastmail.co','lastmail.com','lazyinbox.com','letthemeatspam.com','lhsdv.com','liebt-dich.info','lifebyfood.com','link2mail.net','listomail.com','litedrop.com','loadby.us','login-email.cf','login-email.ga','login-email.ml','login-email.tk','lol.ovpn.to','lookugly.com','lopl.co.cc','lortemail.dk','lovemeleaveme.com','loveyouforever.de','lr7.us','lr78.com','lroid.com','luv2.us','m4ilweb.info','maboard.com','maennerversteherin.com','maennerversteherin.de','mail-filter.com','mail-temporaire.fr','mail.by','mail.htl22.at','mail.mezimages.net','mail.misterpinball.de','mail.svenz.eu','mail114.net','mail15.com','mail2rss.org','mail333.com','mail4days.com','mail4trash.com','mail4u.info','mailbidon.com','mailblocks.com','mailbucket.org','mailcat.biz','mailcatch.*','mailcatch.com','maildrop.cc','maildrop.cf','maildrop.ga','maildrop.gq','maildrop.ml','maildx.com','maileater.com','mailexpire.com','mailfa.tk','mailforspam.com','mailfree.ga','mailfree.gq','mailfree.ml','mailfreeonline.com','mailfs.com','mailguard.me','mailimate.com','mailin8r.com','mailinater.com','mailinator.com','mailinator.gq','mailinator.net','mailinator.org','mailinator.us','mailinator2.com','mailinblack.com','mailincubator.com','mailismagic.com','mailjunk.cf','mailjunk.ga','mailjunk.gq','mailjunk.ml','mailjunk.tk','mailmate.com','mailme.gq','mailme.ir','mailme.lv','mailme24.com','mailmetrash.com','mailmoat.com','mailnator.com','mailnesia.com','mailnull.com','mailpick.biz','mailproxsy.com','mailquack.com','mailrock.biz','mailsac.com','mailscrap.com','mailseal.de','mailshell.com','mailsiphon.com','mailslapping.com','mailslite.com','mailtemp.info','mailtothis.com','mailtrash.net','mailueberfall.de','mailzilla.com','mailzilla.org','mailzilla.orgmbx.cc','makemetheking.com','mamber.net','manifestgenerator.com','manybrain.com','mbx.cc','mciek.com','mega.zik.dj','meine-dateien.info','meine-diashow.de','meine-fotos.info','meine-urlaubsfotos.de','meinspamschutz.de','meltmail.com','messagebeamer.de','metaping.com','mezimages.net','mfsa.ru','mierdamail.com','migumail.com','mintemail.com','mjukglass.nu','mns.ru','moakt.com','mobi.web.id','mobileninja.co.uk','moburl.com','mohmal.com','moncourrier.fr.nf','monemail.fr.nf','monmail.fr.nf','monumentmail.com','ms9.mailslite.com','msa.minsmail.com','msh.mailslite.com','mt2009.com','mt2014.com','mufmail.com','muskelshirt.de','mx0.wwwnew.eu','my-mail.ch','my10minutemail.com','myadult.info','mycleaninbox.net','myemailboxy.com','mymail-in.net','mymailoasis.com','mynetstore.de','mypacks.net','mypartyclip.de','myphantomemail.com','myspaceinc.com','myspaceinc.net','myspaceinc.org','myspacepimpedup.com','myspamless.com','mytemp.email','mytempemail.com','mytop-in.net','mytrashmail.com','mytrashmail.compookmail.com','neomailbox.com','nepwk.com','nervmich.net','nervtmich.net','netmails.com','netmails.net','netterchef.de','netzidiot.de','neue-dateien.de','neverbox.com','nice-4u.com','nmail.cf','no-spam.ws','nobulk.com','noclickemail.com','nogmailspam.info','nomail.xl.cx','nomail2me.com','nomorespamemails.com','nonspam.eu','nonspammer.de','noref.in','nospam.wins.com.br','nospam.ze.tc','nospam4.us','nospamfor.us','nospammail.net','nospamthanks.info','notmailinator.com','notsharingmy.info','nowhere.org','nowmymail.com','ntlhelp.net','nullbox.info','nur-fuer-spam.de','nurfuerspam.de','nus.edu.sg','nwldx.com','nybella.com','objectmail.com','obobbo.com','odaymail.com','office-dateien.de','oikrach.com','one-time.email','oneoffemail.com','oneoffmail.com','onewaymail.com','online.ms','oopi.org','opayq.com','orangatango.com','ordinaryamerican.net','otherinbox.com','ourklips.com','outlawspam.com','ovpn.to','owlpic.com','pancakemail.com','paplease.com','partybombe.de','partyheld.de','pcusers.otherinbox.com','pepbot.com','pfui.ru','phreaker.net','pimpedupmyspace.com','pisem.net','pjjkp.com','pleasedontsendmespam.de','plexolan.de','poczta.onet.pl','politikerclub.de','polizisten-duzer.de','poofy.org','pookmail.com','pornobilder-mal-gratis.com','portsaid.cc','postacin.com','postfach.cc','privacy.net','privy-mail.com','privymail.de','proxymail.eu','prtnx.com','prtz.eu','prydirect.info','pryworld.info','public-files.de','punkass.com','put2.net','putthisinyourspamdatabase.com','pwrby.com','qasti.com','qisdo.com','qisoa.com','qq.com','quantentunnel.de','quickinbox.com','quickmail.nl','qv7.info','radiku.ye.vc','ralib.com','raubtierbaendiger.de','rcpt.at','reallymymail.com','receiveee.chickenkiller.com','receiveee.com','recode.me','reconmail.com','record.me','recursor.net','recyclemail.dk','regbypass.com','regbypass.comsafe-mail.net','rejectmail.com','remail.cf','remail.ga','rhyta.com','rk9.chickenkiller.com','rklips.com','rmqkr.net','rootprompt.org','royal.net','rppkn.com','rtrtr.com','ruffrey.com','s0ny.net','saeuferleber.de','safe-mail.net','safersignup.de','safetymail.info','safetypost.de','sags-per-mail.de','sandelf.de','satka.net','saynotospams.com','scatmail.com','schafmail.de','schmusemail.de','schreib-doch-mal-wieder.de','selfdestructingmail.com','selfdestructingmail.org','sendspamhere.com','senseless-entertainment.com','shared-files.de','sharedmailbox.org','sharklasers.com','shieldedmail.com','shiftmail.com','shinedyoureyes.com','shitmail.me','shitmail.org','shitware.nl','shortmail.net','showslow.de','sibmail.com','sinnlos-mail.de','siria.cc','siteposter.net','skeefmail.com','skeefmail.net','slaskpost.se','slave-auctions.net','slopsbox.com','slushmail.com','smashmail.de','smellfear.com','smellrear.com','sms.at','snakemail.com','sneakemail.com','snkmail.com','sofimail.com','sofort-mail.de','sofortmail.de','softpls.asia','sogetthis.com','sohu.com','soisz.com','solvemail.info','sonnenkinder.org','soodomail.com','soodonims.com','spam-be-gone.com','spam.la','spam.su','spam4.me','spamavert.com','spambob.com','spambob.net','spambob.org','spambog.*','spambog.com','spambog.de','spambog.net','spambog.ru','spambooger.com','spambox.info','spambox.irishspringrealty.com','spambox.us','spamcannon.com','spamcannon.net','spamcero.com','spamcon.org','spamcorptastic.com','spamcowboy.com','spamcowboy.net','spamcowboy.org','spamday.com','spamdecoy.net','spameater.com','spameater.org','spamex.com','spamfighter.cf','spamfighter.ga','spamfighter.gq','spamfighter.ml','spamfighter.tk','spamfree.eu','spamfree24.com','spamfree24.de','spamfree24.eu','spamfree24.info','spamfree24.net','spamfree24.org','spamgoes.in','spamgourmet.com','spamgourmet.net','spamgourmet.org','spamgrube.net','spamherelots.com','spamhereplease.com','spamhole.com','spamify.com','spaminator.de','spamkill.info','spaml.com','spaml.de','spammote.com','spammotel.com','spammuffel.de','spamobox.com','spamoff.de','spamreturn.com','spamsalad.in','spamslicer.com','spamspot.com','spamstack.net','spamthis.co.uk','spamthisplease.com','spamtrail.com','spamtroll.net','speed.1s.fr','sperke.net','spikio.com','spoofmail.de','squizzy.de','sriaus.com','ssoia.com','startkeys.com','stinkefinger.net','stop-my-spam.cf','stop-my-spam.com','stop-my-spam.ga','stop-my-spam.ml','stop-my-spam.tk','streber24.de','streetwisemail.com','stuffmail.de','super-auswahl.de','supergreatmail.com','supermailer.jp','superrito.com','superstachel.de','suremail.info','svk.jp','sweetville.net','sweetxxx.de','tafmail.com','tagesmail.eu','tagyourself.com','talkinator.com','tapchicuoihoi.com','teewars.org','teleworm.com','teleworm.us','temp-mail.com','temp-mail.org','temp.emeraldwebmail.com','temp.headstrong.de','tempail.com','tempalias.com','tempe-mail.com','tempemail.biz','tempemail.co.za','tempemail.com','tempemail.net','tempinbox.co.uk','tempinbox.com','tempmail.it','tempmail2.com','tempmaildemo.com','tempmailer.com','tempomail.fr','temporarily.de','temporarioemail.com.br','temporaryemail.net','temporaryemail.us','temporaryforwarding.com','temporaryinbox.com','tempsky.com','tempthe.net','tempymail.com','terminverpennt.de','test.com','test.de','thanksnospam.info','thankyou2010.com','thecloudindex.com','thepryam.info','thisisnotmyrealemail.com','throam.com','throwawayemailaddress.com','throwawaymail.com','tilien.com','tittbit.in','tmail.ws','tmailinator.com','toiea.com','toomail.biz','topmail-files.de','tortenboxer.de','totalmail.de','tradermail.info','trash-amil.com','trash-mail.at','trash-mail.cf','trash-mail.com','trash-mail.de','trash-mail.ga','trash-mail.gq','trash-mail.ml','trash-mail.tk','trash2009.com','trash2010.com','trash2011.com','trashbox.eu','trashdevil.com','trashdevil.de','trashemail.de','trashmail.at','trashmail.com','trashmail.de','trashmail.me','trashmail.net','trashmail.org','trashmail.ws','trashmailer.com','trashymail.com','trashymail.net','trayna.com','trbvm.com','trickmail.net','trillianpro.com','trimix.cn','tryalert.com','turboprinz.de','turboprinzessin.de','turual.com','twinmail.de','twoweirdtricks.com','tyldd.com','ubismail.net','uggsrock.com','uk2.net','ukr.net','umail.net','unmail.ru','unterderbruecke.de','upliftnow.com','uplipht.com','uroid.com','username.e4ward.com','valemail.net','venompen.com','verlass-mich-nicht.de','veryrealemail.com','vidchart.com','viditag.com','viewcastmedia.com','viewcastmedia.net','viewcastmedia.org','vinbazar.com','vollbio.de','volloeko.de','vomoto.com','vorsicht-bissig.de','vorsicht-scharf.de','vubby.com','walala.org','walkmail.net','war-im-urlaub.de','wbb3.de','webemail.me','webm4il.info','webmail4u.eu','webuser.in','wee.my','weg-werf-email.de','wegwerf-email-addressen.de','wegwerf-emails.de','wegwerfadresse.de','wegwerfemail.com','wegwerfemail.de','wegwerfmail.de','wegwerfmail.info','wegwerfmail.net','wegwerfmail.org','wegwerpmailadres.nl','weibsvolk.de','weibsvolk.org','weinenvorglueck.de','wetrainbayarea.com','wetrainbayarea.org','wh4f.org','whatiaas.com','whatpaas.com','whatsaas.com','whopy.com','whtjddn.33mail.com','whyspam.me','wickmail.net','wilemail.com','will-hier-weg.de','willhackforfood.biz','willselfdestruct.com','winemaven.info','wir-haben-nachwuchs.de','wir-sind-cool.org','wirsindcool.de','wmail.cf','wolke7.net','wollan.info','women-at-work.org','wormseo.cn','wronghead.com','wuzup.net','wuzupmail.net','www.e4ward.com','www.gishpuppy.com','www.mailinator.com','wwwnew.eu','xagloo.com','xemaps.com','xents.com','xmail.com','xmaily.com','xoxox.cc','xoxy.net','xsecurity.org','xyzfree.net','yapped.net','yeah.net','yep.it','yert.ye.vc','yesey.net','yogamaven.com','yomail.info','yopmail.com','yopmail.fr','yopmail.gq','yopmail.net','yopweb.com','youmail.ga','youmailr.com','ypmail.webarnak.fr.eu.org','ystea.org','yuurok.com','yzbid.com','za.com','zehnminutenmail.de','zetmail.com','zippymail.info','zoaxe.com','zoemail.com','zoemail.net','zoemail.org','zomg.info','zweb.in','zxcv.com','zxcvbnm.com','zzz.com');
12
  const DEFAULT_CUSTOMER_KEY = "16555";
13
  const DEFAULT_API_KEY = "fFd2XcvTGDemZvbw1bcUesNJWEqKbbUq";
14
  const DB_VERSION = 155;
15
+ const DB_FEATURE_MAIL = 4;
16
  const SMS_EMAIL_TRANSACTION ="https://plugins.miniorange.com/sms-and-email-transaction-pricing-2fa";
17
+
18
  const SUPPORT_EMAIL = 'info@xecurify.com';
19
  const REAL_TIME_IP_HOST = 'https://firewall.xecurify.com/';
20
  const GENERATE_BACK_CODE = 'https://sitestats.xecurify.com/backupcodeserviceauthentication';
33
  const TWO_FACTOR_SETTINGS = 'miniorange-2-factor-authentication/miniorange_2_factor_settings.php';
34
  const OTP_VERIFICATION_SETTINGS = 'miniorange-otp-verification/miniorange_validation_settings.php';
35
  const SOCIAL_LOGIN_SETTINGS = 'miniorange-login-openid/miniorange_openid_sso_settings.php';
36
+ const TELEGRAM_OTP_LINK = 'https://telegramotp.xecurify.com/teleTest/index.php';
37
 
38
  //arrays
39
  public static $domains = array('0-mail.com','20email.eu','0815.ru','0815.su','0clickemail.com','0sg.net','0wnd.net','0wnd.org','10mail.org','10minutemail.cf','10minutemail.com','10minutemail.de','10minutemail.ga','10minutemail.gq','10minutemail.ml','123-m.com','12hourmail.com','12minutemail.com','1ce.us','1chuan.com','1mail.ml','1pad.de','1zhuan.com','20mail.in','20mail.it','20minutemail.com','21cn.com','24hourmail.com','2prong.com','30minutemail.com','30minutesmail.com','3126.com','33mail.com','3d-painting.com','3mail.ga','4mail.cf','4mail.ga','4warding.com','4warding.net','4warding.org','50e.info','5mail.cf','5mail.ga','60minutemail.com','675hosting.com','675hosting.net','675hosting.org','6ip.us','6mail.cf','6mail.ga','6mail.ml','6paq.com','6url.com','75hosting.com','75hosting.net','75hosting.org','7days-printing.com','7mail.ga','7mail.ml','7tags.com','8mail.cf','8mail.ga','8mail.ml','99experts.com','9mail.cf','9ox.net','BeefMilk.com','DingBone.com','FudgeRub.com','LookUgly.com','MailScrap.com','SmellFear.com','TempEmail.net','a-bc.net','a45.in','abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com','abusemail.de','abwesend.de','abyssmail.com','ac20mail.in','acentri.com','addcom.de','advantimo.com','afrobacon.com','ag.us.to','agedmail.com','agnitumhost.net','ahk.jp','ajaxapp.net','alivance.com','alpenjodel.de','alphafrau.de','amail.com','amilegit.com','amiri.net','amiriindustries.com','amorki.pl','anappthat.com','ano-mail.net','anonbox.net','anonymail.dk','anonymbox.com','antichef.com','antichef.net','antispam.de','antispam24.de','appixie.com','armyspy.com','asdasd.nl','autosfromus.com','aver.com','azmeil.tk','baldmama.de','baldpapa.de','ballyfinance.com','baxomale.ht.cx','beddly.com','beefmilk.com','betriebsdirektor.de','big1.us','bigmir.net','bigprofessor.so','bigstring.com','bin-wieder-da.de','binkmail.com','bio-muesli.info','bio-muesli.net','bladesmail.net','bleib-bei-mir.de','blockfilter.com','blogmyway.org','bluebottle.com','bobmail.info','bodhi.lawlita.com','bofthew.com','bonbon.net','bootybay.de','boun.cr','bouncr.com','boxformail.in','boxtemp.com.br','brefmail.com','brennendesreich.de','briefemail.com','broadbandninja.com','brokenvalve.com','brokenvalve.org','bsnow.net','bspamfree.org','bu.mintemail.com','buerotiger.de','buffemail.com','bugmenot.com','bumpymail.com','bund.us','bundes-li.ga','burnthespam.info','burstmail.info','buy-24h.net.ru','buyusedlibrarybooks.org','c2.hu','cachedot.net','cashette.com','casualdx.com','cbair.com','ce.mintemail.com','cellurl.com','center-mail.de','centermail.at','centermail.ch','centermail.com','centermail.de','centermail.info','centermail.net','cghost.s-a-d.de','chammy.info','cheatmail.de','chogmail.com','choicemail1.com','chong-mail.com','chong-mail.net','chong-mail.org','chongsoft.org','clixser.com','cmail.com','cmail.net','cmail.org','coldemail.info','consumerriot.com','cool.fr.nf','coole-files.de','correo.blogos.net','cosmorph.com','courriel.fr.nf','courrieltemporaire.com','crapmail.org','crazespaces.pw','crazymailing.com','cubiclink.com','curryworld.de','cust.in','cuvox.de','cyber-matrix.com','dacoolest.com','daintly.com','dandikmail.com','dating4best.net','dayrep.com','dbunker.com','dcemail.com','deadaddress.com','deadchildren.org','deadfake.cf','deadfake.ga','deadfake.ml','deadfake.tk','deadspam.com','deagot.com','dealja.com','despam.it','despammed.com','devnullmail.com','dfgh.net','dharmatel.net','die-besten-bilder.de','die-genossen.de','die-optimisten.de','die-optimisten.net','dieMailbox.de','digital-filestore.de','digitalsanctuary.com','dingbone.com','directbox.com','discard.cf','discard.email','discard.ga','discard.gq','discard.ml','discard.tk','discardmail.*','discardmail.com','discardmail.de','discartmail.com','disposable-email.ml','disposable.cf','disposable.ga','disposable.ml','disposableaddress.com','disposableemailaddresses.com','disposableemailaddresses.emailmiser.com','disposableinbox.com','dispose.it','disposeamail.com','disposemail.com','dispostable.com','divermail.com','dm.w3internet.co.uk','example.com','docmail.cz','dodgeit.com','dodgit.com','dodgit.org','dogit.com','doiea.com','domozmail.com','donemail.ru','dontreg.com','dontsendmespam.de','dontsentmespam.de','dotmsg.com','download-privat.de','drdrb.com','drdrb.net','droplar.com','dropmail.me','duam.net','dudmail.com','dump-email.info','dumpandjunk.com','dumpmail.com','dumpmail.de','dumpyemail.com','duskmail.com','dyndns.org','e-mail.com','e-mail.org','e4ward.com','easytrashmail.com','ee2.pl','eelmail.com','einrot.com','einrot.de','eintagsmail.de','email-fake.cf','email-fake.ga','email-fake.gq','email-fake.ml','email-fake.tk','email.org','email4u.info','email60.com','emailage.cf','emailage.ga','emailage.gq','emailage.ml','emailage.tk','emaildienst.de','emailgo.de','emailias.com','emailigo.de','emailinfive.com','emailisvalid.com','emaillime.com','emailmiser.com','emailproxsy.com','emails.ga','emailsensei.com','emailspam.cf','emailspam.ga','emailspam.gq','emailspam.ml','emailspam.tk','emailtaxi.de','emailtemporanea.net','emailtemporar.ro','emailtemporario.com.br','emailthe.net','emailtmp.com','emailto.de','emailwarden.com','emailx.at.hm','emailxfer.com','emailz.cf','emailz.ga','emailz.gq','emailz.ml','emeil.in','emeil.ir','emil.com','emkei.cf','emkei.ga','emkei.gq','emkei.ml','emkei.tk','emz.net','enterto.com','ephemail.net','etranquil.com','etranquil.net','etranquil.org','evopo.com','example.com','explodemail.com','eyepaste.com','facebook-email.cf','facebook-email.ga','facebook-email.ml','facebookmail.gq','facebookmail.ml','fahr-zur-hoelle.org','fake-mail.cf','fake-mail.ga','fake-mail.ml','fakeinbox.cf','fakeinbox.com','fakeinbox.ga','fakeinbox.ml','fakeinbox.tk','fakeinformation.com','fakemail.fr','fakemailgenerator.com','fakemailz.com','falseaddress.com','fammix.com','fansworldwide.de','fantasymail.de','farifluset.mailexpire.com','fastacura.com','fastchevy.com','fastchrysler.com','fastkawasaki.com','fastmazda.com','fastmitsubishi.com','fastnissan.com','fastsubaru.com','fastsuzuki.com','fasttoyota.com','fastyamaha.com','fatflap.com','fdfdsfds.com','feinripptraeger.de','fettabernett.de','fightallspam.com','fiifke.de','filzmail.com','fishfuse.com','fixmail.tk','fizmail.com','fleckens.hu','flurred.com','flyspam.com','footard.com','forgetmail.com','fornow.eu','fr33mail.info','frapmail.com','free-email.cf','free-email.ga','freemail.ms','freemails.cf','freemails.ga','freemails.ml','freemeilaadressforall.net','freudenkinder.de','freundin.ru','friendlymail.co.uk','fromru.com','front14.org','fuckingduh.com','fudgerub.com','fux0ringduh.com','garliclife.com','gawab.com','gelitik.in','gentlemansclub.de','get-mail.cf','get-mail.ga','get-mail.ml','get-mail.tk','get1mail.com','get2mail.fr','getairmail.cf','getairmail.com','getairmail.ga','getairmail.gq','getairmail.ml','getairmail.tk','getmails.eu','getonemail.com','getonemail.net','ghosttexter.de','girlsundertheinfluence.com','gishpuppy.com','goemailgo.com','gold-profits.info','goldtoolbox.com','golfilla.info','gorillaswithdirtyarmpits.com','gotmail.com','gotmail.net','gotmail.org','gotti.otherinbox.com','gowikibooks.com','gowikicampus.com','gowikicars.com','gowikifilms.com','gowikigames.com','gowikimusic.com','gowikinetwork.com','gowikitravel.com','gowikitv.com','grandmamail.com','grandmasmail.com','great-host.in','greensloth.com','grr.la','gsrv.co.uk','guerillamail.biz','guerillamail.com','guerillamail.net','guerillamail.org','guerrillamail.biz','guerrillamail.com','guerrillamail.de','guerrillamail.info','guerrillamail.net','guerrillamail.org','guerrillamailblock.com','gustr.com','h.mintemail.com','h8s.org','hab-verschlafen.de','habmalnefrage.de','hacccc.com','haltospam.com','harakirimail.com','hartbot.de','hatespam.org','hellodream.mobi','herp.in','herr-der-mails.de','hidemail.de','hidzz.com','hmamail.com','hochsitze.com','home.de','hopemail.biz','hot-mail.cf','hot-mail.ga','hot-mail.gq','hot-mail.ml','hot-mail.tk','hotpop.com','hulapla.de','humn.ws.gy','hush.com','hushmail.com','ich-bin-verrueckt-nach-dir.de','ich-will-net.de','ieatspam.eu','ieatspam.info','ieh-mail.de','ihateyoualot.info','iheartspam.org','ikbenspamvrij.nl','imails.info','imgof.com','imstations.com','inbax.tk','inbox.si','inbox2.info','inboxalias.com','inboxclean.com','inboxclean.org','inboxproxy.com','incognitomail.com','incognitomail.net','incognitomail.org','inerted.com','inmail24.com','insorg-mail.info','instant-mail.de','instantemailaddress.com','ipoo.org','irish2me.com','iroid.com','ist-allein.info','ist-einmalig.de','ist-ganz-allein.de','ist-willig.de','iwi.net','izmail.net','jetable.com','jetable.de','jetable.fr.nf','jetable.net','jetable.org','jetfix.ee','jetzt-bin-ich-dran.com','jn-club.de','jnxjn.com','jobbikszimpatizans.hu','jourrapide.com','jsrsolutions.com','junk1e.com','junkmail.com','junkmail.ga','junkmail.gq','kaffeeschluerfer.com','kaffeeschluerfer.de','kasmail.com','kaspop.com','keepmymail.com','killmail.com','killmail.net','kimsdisk.com','kinglibrary.net','kingsq.ga','kir.ch.tc','klassmaster.com','klassmaster.net','klzlk.com','kommespaeter.de','kook.ml','koszmail.pl','krim.ws','kuh.mu','kulturbetrieb.info','kurzepost.de','l33r.eu','labetteraverouge.at','lackmail.net','lags.us','landmail.co','lass-es-geschehen.de','lastmail.co','lastmail.com','lazyinbox.com','letthemeatspam.com','lhsdv.com','liebt-dich.info','lifebyfood.com','link2mail.net','listomail.com','litedrop.com','loadby.us','login-email.cf','login-email.ga','login-email.ml','login-email.tk','lol.ovpn.to','lookugly.com','lopl.co.cc','lortemail.dk','lovemeleaveme.com','loveyouforever.de','lr7.us','lr78.com','lroid.com','luv2.us','m4ilweb.info','maboard.com','maennerversteherin.com','maennerversteherin.de','mail-filter.com','mail-temporaire.fr','mail.by','mail.htl22.at','mail.mezimages.net','mail.misterpinball.de','mail.svenz.eu','mail114.net','mail15.com','mail2rss.org','mail333.com','mail4days.com','mail4trash.com','mail4u.info','mailbidon.com','mailblocks.com','mailbucket.org','mailcat.biz','mailcatch.*','mailcatch.com','maildrop.cc','maildrop.cf','maildrop.ga','maildrop.gq','maildrop.ml','maildx.com','maileater.com','mailexpire.com','mailfa.tk','mailforspam.com','mailfree.ga','mailfree.gq','mailfree.ml','mailfreeonline.com','mailfs.com','mailguard.me','mailimate.com','mailin8r.com','mailinater.com','mailinator.com','mailinator.gq','mailinator.net','mailinator.org','mailinator.us','mailinator2.com','mailinblack.com','mailincubator.com','mailismagic.com','mailjunk.cf','mailjunk.ga','mailjunk.gq','mailjunk.ml','mailjunk.tk','mailmate.com','mailme.gq','mailme.ir','mailme.lv','mailme24.com','mailmetrash.com','mailmoat.com','mailnator.com','mailnesia.com','mailnull.com','mailpick.biz','mailproxsy.com','mailquack.com','mailrock.biz','mailsac.com','mailscrap.com','mailseal.de','mailshell.com','mailsiphon.com','mailslapping.com','mailslite.com','mailtemp.info','mailtothis.com','mailtrash.net','mailueberfall.de','mailzilla.com','mailzilla.org','mailzilla.orgmbx.cc','makemetheking.com','mamber.net','manifestgenerator.com','manybrain.com','mbx.cc','mciek.com','mega.zik.dj','meine-dateien.info','meine-diashow.de','meine-fotos.info','meine-urlaubsfotos.de','meinspamschutz.de','meltmail.com','messagebeamer.de','metaping.com','mezimages.net','mfsa.ru','mierdamail.com','migumail.com','mintemail.com','mjukglass.nu','mns.ru','moakt.com','mobi.web.id','mobileninja.co.uk','moburl.com','mohmal.com','moncourrier.fr.nf','monemail.fr.nf','monmail.fr.nf','monumentmail.com','ms9.mailslite.com','msa.minsmail.com','msh.mailslite.com','mt2009.com','mt2014.com','mufmail.com','muskelshirt.de','mx0.wwwnew.eu','my-mail.ch','my10minutemail.com','myadult.info','mycleaninbox.net','myemailboxy.com','mymail-in.net','mymailoasis.com','mynetstore.de','mypacks.net','mypartyclip.de','myphantomemail.com','myspaceinc.com','myspaceinc.net','myspaceinc.org','myspacepimpedup.com','myspamless.com','mytemp.email','mytempemail.com','mytop-in.net','mytrashmail.com','mytrashmail.compookmail.com','neomailbox.com','nepwk.com','nervmich.net','nervtmich.net','netmails.com','netmails.net','netterchef.de','netzidiot.de','neue-dateien.de','neverbox.com','nice-4u.com','nmail.cf','no-spam.ws','nobulk.com','noclickemail.com','nogmailspam.info','nomail.xl.cx','nomail2me.com','nomorespamemails.com','nonspam.eu','nonspammer.de','noref.in','nospam.wins.com.br','nospam.ze.tc','nospam4.us','nospamfor.us','nospammail.net','nospamthanks.info','notmailinator.com','notsharingmy.info','nowhere.org','nowmymail.com','ntlhelp.net','nullbox.info','nur-fuer-spam.de','nurfuerspam.de','nus.edu.sg','nwldx.com','nybella.com','objectmail.com','obobbo.com','odaymail.com','office-dateien.de','oikrach.com','one-time.email','oneoffemail.com','oneoffmail.com','onewaymail.com','online.ms','oopi.org','opayq.com','orangatango.com','ordinaryamerican.net','otherinbox.com','ourklips.com','outlawspam.com','ovpn.to','owlpic.com','pancakemail.com','paplease.com','partybombe.de','partyheld.de','pcusers.otherinbox.com','pepbot.com','pfui.ru','phreaker.net','pimpedupmyspace.com','pisem.net','pjjkp.com','pleasedontsendmespam.de','plexolan.de','poczta.onet.pl','politikerclub.de','polizisten-duzer.de','poofy.org','pookmail.com','pornobilder-mal-gratis.com','portsaid.cc','postacin.com','postfach.cc','privacy.net','privy-mail.com','privymail.de','proxymail.eu','prtnx.com','prtz.eu','prydirect.info','pryworld.info','public-files.de','punkass.com','put2.net','putthisinyourspamdatabase.com','pwrby.com','qasti.com','qisdo.com','qisoa.com','qq.com','quantentunnel.de','quickinbox.com','quickmail.nl','qv7.info','radiku.ye.vc','ralib.com','raubtierbaendiger.de','rcpt.at','reallymymail.com','receiveee.chickenkiller.com','receiveee.com','recode.me','reconmail.com','record.me','recursor.net','recyclemail.dk','regbypass.com','regbypass.comsafe-mail.net','rejectmail.com','remail.cf','remail.ga','rhyta.com','rk9.chickenkiller.com','rklips.com','rmqkr.net','rootprompt.org','royal.net','rppkn.com','rtrtr.com','ruffrey.com','s0ny.net','saeuferleber.de','safe-mail.net','safersignup.de','safetymail.info','safetypost.de','sags-per-mail.de','sandelf.de','satka.net','saynotospams.com','scatmail.com','schafmail.de','schmusemail.de','schreib-doch-mal-wieder.de','selfdestructingmail.com','selfdestructingmail.org','sendspamhere.com','senseless-entertainment.com','shared-files.de','sharedmailbox.org','sharklasers.com','shieldedmail.com','shiftmail.com','shinedyoureyes.com','shitmail.me','shitmail.org','shitware.nl','shortmail.net','showslow.de','sibmail.com','sinnlos-mail.de','siria.cc','siteposter.net','skeefmail.com','skeefmail.net','slaskpost.se','slave-auctions.net','slopsbox.com','slushmail.com','smashmail.de','smellfear.com','smellrear.com','sms.at','snakemail.com','sneakemail.com','snkmail.com','sofimail.com','sofort-mail.de','sofortmail.de','softpls.asia','sogetthis.com','sohu.com','soisz.com','solvemail.info','sonnenkinder.org','soodomail.com','soodonims.com','spam-be-gone.com','spam.la','spam.su','spam4.me','spamavert.com','spambob.com','spambob.net','spambob.org','spambog.*','spambog.com','spambog.de','spambog.net','spambog.ru','spambooger.com','spambox.info','spambox.irishspringrealty.com','spambox.us','spamcannon.com','spamcannon.net','spamcero.com','spamcon.org','spamcorptastic.com','spamcowboy.com','spamcowboy.net','spamcowboy.org','spamday.com','spamdecoy.net','spameater.com','spameater.org','spamex.com','spamfighter.cf','spamfighter.ga','spamfighter.gq','spamfighter.ml','spamfighter.tk','spamfree.eu','spamfree24.com','spamfree24.de','spamfree24.eu','spamfree24.info','spamfree24.net','spamfree24.org','spamgoes.in','spamgourmet.com','spamgourmet.net','spamgourmet.org','spamgrube.net','spamherelots.com','spamhereplease.com','spamhole.com','spamify.com','spaminator.de','spamkill.info','spaml.com','spaml.de','spammote.com','spammotel.com','spammuffel.de','spamobox.com','spamoff.de','spamreturn.com','spamsalad.in','spamslicer.com','spamspot.com','spamstack.net','spamthis.co.uk','spamthisplease.com','spamtrail.com','spamtroll.net','speed.1s.fr','sperke.net','spikio.com','spoofmail.de','squizzy.de','sriaus.com','ssoia.com','startkeys.com','stinkefinger.net','stop-my-spam.cf','stop-my-spam.com','stop-my-spam.ga','stop-my-spam.ml','stop-my-spam.tk','streber24.de','streetwisemail.com','stuffmail.de','super-auswahl.de','supergreatmail.com','supermailer.jp','superrito.com','superstachel.de','suremail.info','svk.jp','sweetville.net','sweetxxx.de','tafmail.com','tagesmail.eu','tagyourself.com','talkinator.com','tapchicuoihoi.com','teewars.org','teleworm.com','teleworm.us','temp-mail.com','temp-mail.org','temp.emeraldwebmail.com','temp.headstrong.de','tempail.com','tempalias.com','tempe-mail.com','tempemail.biz','tempemail.co.za','tempemail.com','tempemail.net','tempinbox.co.uk','tempinbox.com','tempmail.it','tempmail2.com','tempmaildemo.com','tempmailer.com','tempomail.fr','temporarily.de','temporarioemail.com.br','temporaryemail.net','temporaryemail.us','temporaryforwarding.com','temporaryinbox.com','tempsky.com','tempthe.net','tempymail.com','terminverpennt.de','test.com','test.de','thanksnospam.info','thankyou2010.com','thecloudindex.com','thepryam.info','thisisnotmyrealemail.com','throam.com','throwawayemailaddress.com','throwawaymail.com','tilien.com','tittbit.in','tmail.ws','tmailinator.com','toiea.com','toomail.biz','topmail-files.de','tortenboxer.de','totalmail.de','tradermail.info','trash-amil.com','trash-mail.at','trash-mail.cf','trash-mail.com','trash-mail.de','trash-mail.ga','trash-mail.gq','trash-mail.ml','trash-mail.tk','trash2009.com','trash2010.com','trash2011.com','trashbox.eu','trashdevil.com','trashdevil.de','trashemail.de','trashmail.at','trashmail.com','trashmail.de','trashmail.me','trashmail.net','trashmail.org','trashmail.ws','trashmailer.com','trashymail.com','trashymail.net','trayna.com','trbvm.com','trickmail.net','trillianpro.com','trimix.cn','tryalert.com','turboprinz.de','turboprinzessin.de','turual.com','twinmail.de','twoweirdtricks.com','tyldd.com','ubismail.net','uggsrock.com','uk2.net','ukr.net','umail.net','unmail.ru','unterderbruecke.de','upliftnow.com','uplipht.com','uroid.com','username.e4ward.com','valemail.net','venompen.com','verlass-mich-nicht.de','veryrealemail.com','vidchart.com','viditag.com','viewcastmedia.com','viewcastmedia.net','viewcastmedia.org','vinbazar.com','vollbio.de','volloeko.de','vomoto.com','vorsicht-bissig.de','vorsicht-scharf.de','vubby.com','walala.org','walkmail.net','war-im-urlaub.de','wbb3.de','webemail.me','webm4il.info','webmail4u.eu','webuser.in','wee.my','weg-werf-email.de','wegwerf-email-addressen.de','wegwerf-emails.de','wegwerfadresse.de','wegwerfemail.com','wegwerfemail.de','wegwerfmail.de','wegwerfmail.info','wegwerfmail.net','wegwerfmail.org','wegwerpmailadres.nl','weibsvolk.de','weibsvolk.org','weinenvorglueck.de','wetrainbayarea.com','wetrainbayarea.org','wh4f.org','whatiaas.com','whatpaas.com','whatsaas.com','whopy.com','whtjddn.33mail.com','whyspam.me','wickmail.net','wilemail.com','will-hier-weg.de','willhackforfood.biz','willselfdestruct.com','winemaven.info','wir-haben-nachwuchs.de','wir-sind-cool.org','wirsindcool.de','wmail.cf','wolke7.net','wollan.info','women-at-work.org','wormseo.cn','wronghead.com','wuzup.net','wuzupmail.net','www.e4ward.com','www.gishpuppy.com','www.mailinator.com','wwwnew.eu','xagloo.com','xemaps.com','xents.com','xmail.com','xmaily.com','xoxox.cc','xoxy.net','xsecurity.org','xyzfree.net','yapped.net','yeah.net','yep.it','yert.ye.vc','yesey.net','yogamaven.com','yomail.info','yopmail.com','yopmail.fr','yopmail.gq','yopmail.net','yopweb.com','youmail.ga','youmailr.com','ypmail.webarnak.fr.eu.org','ystea.org','yuurok.com','yzbid.com','za.com','zehnminutenmail.de','zetmail.com','zippymail.info','zoaxe.com','zoemail.com','zoemail.net','zoemail.org','zomg.info','zweb.in','zxcv.com','zxcvbnm.com','zzz.com');
helper/messages.php CHANGED
@@ -178,8 +178,22 @@
178
  </form>
179
  </div>
180
  ";
181
-
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
 
184
  public static $notification_array = array('malware_notification_option' => MoWpnsMessages::NEW_PLUGIN_THEME_CHECK ,
185
  'backup_notification_option' => MoWpnsMessages::CREATE_BACKUP,
@@ -188,7 +202,7 @@
188
  'waf_notification_option' => MoWpnsMessages::WAF_NOTICE
189
  );
190
 
191
-
192
 
193
 
194
 
@@ -202,6 +216,10 @@
202
  return $message;
203
  }
204
 
205
- }
206
 
 
207
  ?>
 
 
 
 
178
  </form>
179
  </div>
180
  ";
 
181
 
182
+ const NOTIFYING_USER_FOR_REMOVING_NETWORK_SECURITY ='
183
+ <div class="notice notice-warning mo2f-notice-warning MOWrn mo2f-banner">
184
+ <form id="mo2f-notification-form" class="mo2f-notification-form" method="post" action=" ">
185
+ <div class="mo-logo"><img width="50" height="50" src="'.MO2F_PLUGIN_URL.'includes'.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'miniorange_logo.png'.'">
186
+ </div>
187
+ &nbsp;
188
+ <p class="mo2f-notification-text"><b>Warning!</b> Website security features will be remove from next update. You can download our <a href="https://wordpress.org/plugins/miniorange-limit-login-attempts/" class="mo-limit-login-link"><u><b>Limit Login Attempts plugin</b></u></a> for using Website Security Features.</p>
189
+ &nbsp;
190
+ <input type="hidden" name="mo2f_remove_network_security" value="1" />
191
+ <div style="text-align:center;">
192
+ <button type=submit class="mo2f-acknowledge-button" id="mo2f-acknowledge-button"><u>Dismiss</u></a>
193
+ </div>
194
+ </form>
195
+ </div>
196
+ ';
197
 
198
  public static $notification_array = array('malware_notification_option' => MoWpnsMessages::NEW_PLUGIN_THEME_CHECK ,
199
  'backup_notification_option' => MoWpnsMessages::CREATE_BACKUP,
202
  'waf_notification_option' => MoWpnsMessages::WAF_NOTICE
203
  );
204
 
205
+
206
 
207
 
208
 
216
  return $message;
217
  }
218
 
 
219
 
220
+ }
221
  ?>
222
+
223
+
224
+
225
+
helper/utility.php CHANGED
@@ -377,6 +377,7 @@ class MoWpnsUtility
377
  $login_with_mfa_use = get_site_option('mo2f_login_with_mfa_use');
378
  $EmailTransactions = MoWpnsUtility::get_mo2f_db_option('cmVtYWluaW5nT1RQ', 'site_option');
379
  $SMSTransactions = get_site_option('cmVtYWluaW5nT1RQVHJhbnNhY3Rpb25z')?get_site_option('cmVtYWluaW5nT1RQVHJhbnNhY3Rpb25z'):0;
 
380
  $SQLInjection = get_option('SQLInjection');
381
  $user_profile = get_option('mo2fa_userProfile_method');
382
  $XSSAttack = get_option('XSSAttack');
@@ -443,7 +444,7 @@ class MoWpnsUtility
443
  }else{
444
  $plugin_configuration = $plugin_configuration . $space . "Setup Wizard Skipped: No";
445
  }
446
-
447
  if(!$send_all_configuration)
448
  return $plugin_configuration;
449
 
@@ -458,6 +459,7 @@ class MoWpnsUtility
458
  if(!MoWpnsUtility::get_mo2f_db_option('mo_wpns_2fa_with_network_security', 'get_option'))
459
  return $plugin_configuration;
460
 
 
461
  $plugin_configuration = $plugin_configuration.$space."SQL Injection:".$SQLInjection .$space."XSS Attack:".$XSSAttack.$space."RFI Attack:".$RFIAttack.$space."Limit Attack:".$limitAttack.$space."RCE Attack:".$RCEAttack;
462
 
463
  $plugin_configuration=$plugin_configuration.(get_option('Rate_limiting')?$space."Rate request:".$Rate_request:'');
377
  $login_with_mfa_use = get_site_option('mo2f_login_with_mfa_use');
378
  $EmailTransactions = MoWpnsUtility::get_mo2f_db_option('cmVtYWluaW5nT1RQ', 'site_option');
379
  $SMSTransactions = get_site_option('cmVtYWluaW5nT1RQVHJhbnNhY3Rpb25z')?get_site_option('cmVtYWluaW5nT1RQVHJhbnNhY3Rpb25z'):0;
380
+ $removensacknowledged = get_site_option('mo2f-remove-ns-acknowledged')?"Remove NS Message Acknowledged: Yes":"Remove NS Message Acknowledged: No";
381
  $SQLInjection = get_option('SQLInjection');
382
  $user_profile = get_option('mo2fa_userProfile_method');
383
  $XSSAttack = get_option('XSSAttack');
444
  }else{
445
  $plugin_configuration = $plugin_configuration . $space . "Setup Wizard Skipped: No";
446
  }
447
+
448
  if(!$send_all_configuration)
449
  return $plugin_configuration;
450
 
459
  if(!MoWpnsUtility::get_mo2f_db_option('mo_wpns_2fa_with_network_security', 'get_option'))
460
  return $plugin_configuration;
461
 
462
+ $plugin_configuration = $plugin_configuration . $space . $removensacknowledged ;
463
  $plugin_configuration = $plugin_configuration.$space."SQL Injection:".$SQLInjection .$space."XSS Attack:".$XSSAttack.$space."RFI Attack:".$RFIAttack.$space."Limit Attack:".$limitAttack.$space."RCE Attack:".$RCEAttack;
464
 
465
  $plugin_configuration=$plugin_configuration.(get_option('Rate_limiting')?$space."Rate request:".$Rate_request:'');
includes/css/phone.css CHANGED
@@ -331,4 +331,46 @@
331
 
332
  .actions {
333
  margin-top: 20px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  }
331
 
332
  .actions {
333
  margin-top: 20px;
334
+ }
335
+
336
+ .mo2f-banner {
337
+ display:flex;
338
+ flex-direction:row;
339
+ margin-left:-20px;
340
+ background-color: #fcf8e3;
341
+
342
+ }
343
+ .mo-logo {
344
+ color: white;
345
+ background-color: #fcf8e3!important;
346
+ border: #fcb714!important;
347
+ padding-top: 5px;
348
+ padding-left: 20px;
349
+ }
350
+ .mo2f-notification-text{
351
+ color:#8a6d3b;
352
+ font-size: 1.2em;
353
+ padding-top: 8px!important;
354
+ }
355
+ .mo2f-acknowledge-button{
356
+ text-decoration: none;
357
+ color:#8a6d3b;
358
+ font-size: 1.3em;
359
+ padding-top: 15px;
360
+ background: none;
361
+ border: none;
362
+ cursor:pointer;
363
+ }
364
+ .mo-limit-login-link{
365
+ text-decoration: none;
366
+ color:#8a6d3b;
367
+
368
+ }
369
+ .mo-limit-login-link:hover{
370
+ color:#8a6d3b;
371
+ }
372
+
373
+ .mo2f-notification-form{
374
+ display:flex;
375
+ flex-direction: row wrap;
376
  }
includes/email-New-release.php CHANGED
@@ -208,8 +208,8 @@ a[x-apple-data-detectors=\'true\'] {
208
  <h2 class="mo_2fa_email_feature_title">Grace Period</h2>
209
  <ul class="mo_2fa_feature_ul">
210
  <li> Allows you to set grace period for users to configure 2FA </li>
211
- <li> Locks out users if their 2FA is not set within grace period interval </li>
212
- <li> Admins can unblock users which are locked out </li>
213
  </ul>
214
  </div>
215
  </div>
208
  <h2 class="mo_2fa_email_feature_title">Grace Period</h2>
209
  <ul class="mo_2fa_feature_ul">
210
  <li> Allows you to set grace period for users to configure 2FA </li>
211
+ <li> Enforce users to setup 2FA if their 2FA is not set within grace period interval </li>
212
+
213
  </ul>
214
  </div>
215
  </div>
includes/images/warning.png ADDED
Binary 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 TFA plugin provides various two-factor authentication methods as an additional layer of security after the default wordpress login. We Support Google/Authy/LastPass Authenticator, QR Code, Push Notification, Soft Token and Security Questions(KBA) for 3 User in the free version of the plugin.
6
- * Version: 5.6.2
7
  * Author: miniOrange
8
  * Author URI: https://miniorange.com
9
  * Text Domain: miniorange-2-factor-authentication
@@ -14,7 +14,7 @@
14
  require dirname(__FILE__).DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'email-IPaddress.php';
15
 
16
  define( 'MO_HOST_NAME', 'https://login.xecurify.com' );
17
- define( 'MO2F_VERSION', '5.6.2' );
18
  define( 'MO2F_PLUGIN_URL', (plugin_dir_url(__FILE__)));
19
  define( 'MO2F_TEST_MODE', false );
20
  define( 'MO2F_IS_ONPREM', get_option('is_onprem'));
@@ -35,6 +35,7 @@
35
  add_action( 'admin_enqueue_scripts' , array( $this, 'mo_wpns_settings_script' ) );
36
  add_action( 'wpns_show_message' , array( $this, 'mo_show_message' ), 1 , 2 );
37
  add_action('init' , array( $this, 'mo2f_check_grace_period'));
 
38
  add_action( 'admin_init' , array( $this, 'miniorange_reset_save_settings' ) );
39
  add_filter('manage_users_columns' , array( $this, 'mo2f_mapped_email_column' ) );
40
  add_action('manage_users_custom_column' , array( $this, 'mo2f_mapped_email_column_content'), 10, 3 );
@@ -55,13 +56,23 @@
55
  add_action('admin_init',array( $customShort, 'mo_enqueue_shortcode' ));
56
  add_action( 'elementor/init', array($this, 'mo2fa_login_elementor_note'));
57
  add_shortcode('mo2f_enable_register',array($this,'mo2f_enable_register_shortcode'));
 
58
  if(defined("DIGIMEMBER_DIR"))
59
  {
60
  add_action( 'wp_footer', array( $this, 'mo_wpns_ajax_login_script'));
61
  }
62
 
63
  }
 
 
 
 
 
 
 
 
64
 
 
65
  //Function checks user's grace period status every 3hrs when user is logged in.
66
  function mo2f_check_grace_period()
67
  {
@@ -107,6 +118,9 @@
107
  else
108
  echo MoWpnsMessages::showMessage('FREE_TRIAL_MESSAGE_TRIAL_PAGE');
109
  }
 
 
 
110
 
111
  }
112
  function mo2f_get_dismiss_days($option_name){
@@ -122,7 +136,7 @@
122
  if(!is_user_logged_in())
123
  {
124
  wp_enqueue_script( 'jquery' );
125
- wp_enqueue_script( 'mo2fa_elementor_script', $mainDir. 'includes/js/mo2fa_elementor.js' );
126
 
127
  wp_localize_script( 'mo2fa_elementor_script', 'my_ajax_object',
128
  array( 'ajax_url' => get_site_url() .'/login/' ,
@@ -160,9 +174,9 @@
160
  else
161
  $javaScript = 'includes/js/custom-form.js';
162
 
163
- wp_enqueue_style( 'mo2f_intl_tel_style', plugin_dir_url(__FILE__).'includes/css/phone.css');
164
- wp_enqueue_script( 'mo2f_intl_tel_script',plugin_dir_url(__FILE__).'includes/js/phone.js');
165
- wp_register_script('mo2f_otpVerification',plugin_dir_url(__FILE__).$javaScript);
166
  wp_localize_script('mo2f_otpVerification', 'otpverificationObj',
167
  array('siteURL'=> admin_url( 'admin-ajax.php'),
168
  'nonce'=>wp_create_nonce('ajax-nonce'),
@@ -196,7 +210,7 @@
196
  wp_enqueue_style( 'wp-pointer' );
197
  wp_enqueue_script( 'wp-pointer' );
198
  wp_enqueue_script( 'utils' );
199
- wp_enqueue_style( 'mo_wpns_admin_plugins_page_style', plugins_url( '/includes/css/style_settings.css?ver=5.5.7', __FILE__ ) );
200
 
201
  include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'feedback_form.php';;
202
 
@@ -417,28 +431,28 @@
417
  function mo_wpns_settings_style($hook)
418
  {
419
  if(strpos($hook, 'page_mo_2fa')){
420
- wp_enqueue_style( 'mo_2fa_admin_settings_jquery_style' , plugins_url('includes/css/jquery.ui.css', __FILE__ ) );
421
- wp_enqueue_style( 'mo_2fa_admin_settings_phone_style' , plugins_url('includes/css/phone.css', __FILE__ ) );
422
- wp_enqueue_style( 'mo_wpns_admin_settings_style' , plugins_url('includes/css/style_settings.css', __FILE__));
423
- wp_enqueue_style( 'mo_wpns_admin_settings_phone_style' , plugins_url('includes/css/phone.css', __FILE__));
424
- wp_enqueue_style( 'mo_wpns_admin_settings_datatable_style' , plugins_url('includes/css/jquery.dataTables.min.css', __FILE__));
425
- wp_enqueue_style( 'mo_wpns_button_settings_style' , plugins_url('includes/css/button_styles.css',__FILE__));
426
- wp_enqueue_style( 'mo_wpns_popup_settings_style' , plugins_url('includes/css/popup.css',__FILE__));
427
  }
428
  }
429
 
430
  function mo_wpns_settings_script($hook)
431
  {
432
- wp_enqueue_script( 'mo_wpns_admin_settings_script' , plugins_url('includes/js/settings_page.js', __FILE__ ), array('jquery'));
433
  if(strpos($hook, 'page_mo_2fa')){
434
- wp_enqueue_script( 'mo_wpns_hide_warnings_script' , plugins_url('includes/js/hide.js', __FILE__ ), array('jquery'));
435
- wp_enqueue_script( 'mo_wpns_admin_settings_phone_script' , plugins_url('includes/js/phone.js', __FILE__ ));
436
- wp_enqueue_script( 'mo_wpns_admin_datatable_script' , plugins_url('includes/js/jquery.dataTables.min.js', __FILE__ ), array('jquery'));
437
- wp_enqueue_script( 'mo_wpns_qrcode_script', plugins_url( "/includes/jquery-qrcode/jquery-qrcode.js", __FILE__ ) );
438
- wp_enqueue_script( 'mo_wpns_min_qrcode_script', plugins_url( "/includes/jquery-qrcode/jquery-qrcode.min.js", __FILE__ ) );
439
  wp_enqueue_script('jquery-ui-core');
440
  wp_enqueue_script('jquery-ui-autocomplete');
441
- wp_enqueue_script('mo_2fa_select2_script', plugins_url("/includes/js/select2.min.js", __FILE__));
442
  }
443
  }
444
 
@@ -446,7 +460,7 @@
446
 
447
  function mo_wpns_ajax_login_script($hook){
448
  if(get_option('mo2f_activate_plugin') and (get_option( 'mo_2factor_admin_registration_status' ) == 'MO_2_FACTOR_CUSTOMER_REGISTERED_SUCCESS' or MO2F_IS_ONPREM )){
449
- wp_enqueue_script( 'dmajax_script', plugins_url('includes/js/dmajax.js',__FILE__ ));
450
  wp_localize_script( 'dmajax_script', 'my_ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ));
451
  ?>
452
  <input type="hidden" name="miniorange_login_nonce"
@@ -459,14 +473,14 @@
459
  </script>
460
  <?php
461
  wp_enqueue_script( 'jquery');
462
- wp_enqueue_script( 'flash_script', plugins_url( 'includes/js/rba/js/jquery.flash.js', __FILE__ ) );
463
- wp_enqueue_script( 'uaparser_script', plugins_url( 'includes/js/rba/js/ua-parser.js', __FILE__) );
464
- wp_enqueue_script( 'client_script', plugins_url( 'includes/js/rba/js/client.js', __FILE__ ) );
465
- wp_enqueue_script( 'device_script', plugins_url( 'includes/js/rba/js/device_attributes.js',__FILE__ ) );
466
- wp_enqueue_script( 'swf_script', plugins_url( 'includes/js/rba/js/swfobject.js', __FILE__ ) );
467
- wp_enqueue_script( 'font_script', plugins_url( 'includes/js/rba/js/fontdetect.js', __FILE__ ) );
468
- wp_enqueue_script( 'murmur_script', plugins_url( 'includes/js/rba/js/murmurhash3.js', __FILE__ ) );
469
- wp_enqueue_script( 'miniorange_script', plugins_url( 'includes/js/rba/js/miniorange-fp.js', __FILE__ ) );
470
  }
471
  else if( get_site_option('mo2f_enable_2fa_prompt_on_login_page'))
472
  {
@@ -593,7 +607,7 @@
593
  $tfa_enabled = $Mo2fdbQueries->get_user_detail( 'mo2f_2factor_enable_2fa_byusers', $user_object->ID );
594
  $mo_2factor_user_registration_status = $Mo2fdbQueries->get_user_detail( 'mo_2factor_user_registration_status', $user_object->ID );
595
 
596
- if($tfa_enabled == 0 && ($mo_2factor_user_registration_status != 'MO_2_FACTOR_PLUGIN_SETTINGS') && $tfa_enabled != '')
597
  $mo2f_configured_2FA_method = 1;
598
  if ( current_user_can( 'administrator', $user_object->ID ) && $mo2f_configured_2FA_method ) {
599
  if(get_current_user_id() != $user_object->ID){
@@ -728,13 +742,13 @@
728
  delete_user_meta($user_id,'mo2f_whatsapp_id');
729
  $Mo2fdbQueries->delete_user_details( $user_id);
730
  delete_user_meta($user_id,'mo2f_2FA_method_to_test');
731
-
 
732
 
733
  }
734
  }
735
  }
736
- if(isset($_POST['mo2f_dismiss_trial']) && sanitize_text_field($_POST['mo2f_dismiss_trial'] == 'mo2f_dismiss_trial'))
737
- update_site_option('mo2f_donot_show_trial_notice_always', 1);
738
  }
739
 
740
  function mo2f_mapped_email_column_content($value, $column_name, $user_id) {
@@ -797,6 +811,58 @@
797
  {
798
  wp_mail( $email,$subject,$messages,$headers);
799
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
800
  }
801
 
802
  new Miniorange_twoFactor;
3
  * Plugin Name: miniOrange 2 Factor Authentication
4
  * Plugin URI: https://miniorange.com
5
  * Description: This TFA plugin provides various two-factor authentication methods as an additional layer of security after the default wordpress login. We Support Google/Authy/LastPass Authenticator, QR Code, Push Notification, Soft Token and Security Questions(KBA) for 3 User in the free version of the plugin.
6
+ * Version: 5.6.3
7
  * Author: miniOrange
8
  * Author URI: https://miniorange.com
9
  * Text Domain: miniorange-2-factor-authentication
14
  require dirname(__FILE__).DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'email-IPaddress.php';
15
 
16
  define( 'MO_HOST_NAME', 'https://login.xecurify.com' );
17
+ define( 'MO2F_VERSION', '5.6.3' );
18
  define( 'MO2F_PLUGIN_URL', (plugin_dir_url(__FILE__)));
19
  define( 'MO2F_TEST_MODE', false );
20
  define( 'MO2F_IS_ONPREM', get_option('is_onprem'));
35
  add_action( 'admin_enqueue_scripts' , array( $this, 'mo_wpns_settings_script' ) );
36
  add_action( 'wpns_show_message' , array( $this, 'mo_show_message' ), 1 , 2 );
37
  add_action('init' , array( $this, 'mo2f_check_grace_period'));
38
+ add_action('admin_init' , array( $this, 'mo2f_admin_notification'));
39
  add_action( 'admin_init' , array( $this, 'miniorange_reset_save_settings' ) );
40
  add_filter('manage_users_columns' , array( $this, 'mo2f_mapped_email_column' ) );
41
  add_action('manage_users_custom_column' , array( $this, 'mo2f_mapped_email_column_content'), 10, 3 );
56
  add_action('admin_init',array( $customShort, 'mo_enqueue_shortcode' ));
57
  add_action( 'elementor/init', array($this, 'mo2fa_login_elementor_note'));
58
  add_shortcode('mo2f_enable_register',array($this,'mo2f_enable_register_shortcode'));
59
+
60
  if(defined("DIGIMEMBER_DIR"))
61
  {
62
  add_action( 'wp_footer', array( $this, 'mo_wpns_ajax_login_script'));
63
  }
64
 
65
  }
66
+ function mo2f_admin_notification()
67
+ {
68
+ if( isset($_POST['mo2f_remove_network_security']) && sanitize_text_field($_POST['mo2f_remove_network_security']) )
69
+ update_site_option('mo2f-remove-ns-acknowledged','1');
70
+
71
+ if(isset($_POST['mo2f_dismiss_trial']) && sanitize_text_field($_POST['mo2f_dismiss_trial'] == 'mo2f_dismiss_trial'))
72
+ update_site_option('mo2f_donot_show_trial_notice_always', 1);
73
+
74
 
75
+ }
76
  //Function checks user's grace period status every 3hrs when user is logged in.
77
  function mo2f_check_grace_period()
78
  {
118
  else
119
  echo MoWpnsMessages::showMessage('FREE_TRIAL_MESSAGE_TRIAL_PAGE');
120
  }
121
+ if(current_user_can('administrator') && get_option('mo_wpns_2fa_with_network_security') && !get_site_option('mo2f-remove-ns-acknowledged')){
122
+ echo MoWpnsMessages::showMessage('NOTIFYING_USER_FOR_REMOVING_NETWORK_SECURITY');
123
+ }
124
 
125
  }
126
  function mo2f_get_dismiss_days($option_name){
136
  if(!is_user_logged_in())
137
  {
138
  wp_enqueue_script( 'jquery' );
139
+ wp_enqueue_script( 'mo2fa_elementor_script', $mainDir. 'includes/js/mo2fa_elementor.js',[],MO2F_VERSION);
140
 
141
  wp_localize_script( 'mo2fa_elementor_script', 'my_ajax_object',
142
  array( 'ajax_url' => get_site_url() .'/login/' ,
174
  else
175
  $javaScript = 'includes/js/custom-form.js';
176
 
177
+ wp_enqueue_style( 'mo2f_intl_tel_style', plugin_dir_url(__FILE__).'includes/css/phone.css',[],MO2F_VERSION);
178
+ wp_enqueue_script( 'mo2f_intl_tel_script',plugin_dir_url(__FILE__).'includes/js/phone.js',[],MO2F_VERSION);
179
+ wp_register_script('mo2f_otpVerification',plugin_dir_url(__FILE__).$javaScript,[],MO2F_VERSION);
180
  wp_localize_script('mo2f_otpVerification', 'otpverificationObj',
181
  array('siteURL'=> admin_url( 'admin-ajax.php'),
182
  'nonce'=>wp_create_nonce('ajax-nonce'),
210
  wp_enqueue_style( 'wp-pointer' );
211
  wp_enqueue_script( 'wp-pointer' );
212
  wp_enqueue_script( 'utils' );
213
+ wp_enqueue_style( 'mo_wpns_admin_plugins_page_style', plugins_url( '/includes/css/style_settings.css', __FILE__ ),[],MO2F_VERSION );
214
 
215
  include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'feedback_form.php';;
216
 
431
  function mo_wpns_settings_style($hook)
432
  {
433
  if(strpos($hook, 'page_mo_2fa')){
434
+ wp_enqueue_style( 'mo_2fa_admin_settings_jquery_style' , plugins_url('includes/css/jquery.ui.css', __FILE__ ),[],MO2F_VERSION );
435
+ wp_enqueue_style( 'mo_2fa_admin_settings_phone_style' , plugins_url('includes/css/phone.css', __FILE__ ),[],MO2F_VERSION );
436
+ wp_enqueue_style( 'mo_wpns_admin_settings_style' , plugins_url('includes/css/style_settings.css', __FILE__),[],MO2F_VERSION );
437
+ wp_enqueue_style( 'mo_wpns_admin_settings_phone_style' , plugins_url('includes/css/phone.css', __FILE__),[],MO2F_VERSION );
438
+ wp_enqueue_style( 'mo_wpns_admin_settings_datatable_style' , plugins_url('includes/css/jquery.dataTables.min.css', __FILE__),[],MO2F_VERSION );
439
+ wp_enqueue_style( 'mo_wpns_button_settings_style' , plugins_url('includes/css/button_styles.css',__FILE__),[],MO2F_VERSION );
440
+ wp_enqueue_style( 'mo_wpns_popup_settings_style' , plugins_url('includes/css/popup.css',__FILE__),[],MO2F_VERSION );
441
  }
442
  }
443
 
444
  function mo_wpns_settings_script($hook)
445
  {
446
+ wp_enqueue_script( 'mo_wpns_admin_settings_script' , plugins_url('includes/js/settings_page.js', __FILE__ ), array('jquery'),MO2F_VERSION );
447
  if(strpos($hook, 'page_mo_2fa')){
448
+ wp_enqueue_script( 'mo_wpns_hide_warnings_script' , plugins_url('includes/js/hide.js', __FILE__ ), array('jquery'),MO2F_VERSION );
449
+ wp_enqueue_script( 'mo_wpns_admin_settings_phone_script' , plugins_url('includes/js/phone.js', __FILE__ ),[],MO2F_VERSION );
450
+ wp_enqueue_script( 'mo_wpns_admin_datatable_script' , plugins_url('includes/js/jquery.dataTables.min.js', __FILE__ ), array('jquery'),MO2F_VERSION );
451
+ wp_enqueue_script( 'mo_wpns_qrcode_script', plugins_url( '/includes/jquery-qrcode/jquery-qrcode.js', __FILE__ ),[],MO2F_VERSION );
452
+ wp_enqueue_script( 'mo_wpns_min_qrcode_script', plugins_url( '/includes/jquery-qrcode/jquery-qrcode.min.js', __FILE__ ),[],MO2F_VERSION );
453
  wp_enqueue_script('jquery-ui-core');
454
  wp_enqueue_script('jquery-ui-autocomplete');
455
+ wp_enqueue_script('mo_2fa_select2_script', plugins_url('/includes/js/select2.min.js', __FILE__),[],MO2F_VERSION );
456
  }
457
  }
458
 
460
 
461
  function mo_wpns_ajax_login_script($hook){
462
  if(get_option('mo2f_activate_plugin') and (get_option( 'mo_2factor_admin_registration_status' ) == 'MO_2_FACTOR_CUSTOMER_REGISTERED_SUCCESS' or MO2F_IS_ONPREM )){
463
+ wp_enqueue_script( 'dmajax_script', plugins_url('includes/js/dmajax.js',__FILE__ ),[],MO2F_VERSION );
464
  wp_localize_script( 'dmajax_script', 'my_ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ));
465
  ?>
466
  <input type="hidden" name="miniorange_login_nonce"
473
  </script>
474
  <?php
475
  wp_enqueue_script( 'jquery');
476
+ wp_enqueue_script( 'flash_script', plugins_url( 'includes/js/rba/js/jquery.flash.js', __FILE__ ),[],MO2F_VERSION);
477
+ wp_enqueue_script( 'uaparser_script', plugins_url( 'includes/js/rba/js/ua-parser.js', __FILE__),[],MO2F_VERSION );
478
+ wp_enqueue_script( 'client_script', plugins_url( 'includes/js/rba/js/client.js', __FILE__ ),[],MO2F_VERSION );
479
+ wp_enqueue_script( 'device_script', plugins_url( 'includes/js/rba/js/device_attributes.js',__FILE__ ),[],MO2F_VERSION );
480
+ wp_enqueue_script( 'swf_script', plugins_url( 'includes/js/rba/js/swfobject.js', __FILE__ ),[],MO2F_VERSION );
481
+ wp_enqueue_script( 'font_script', plugins_url( 'includes/js/rba/js/fontdetect.js', __FILE__ ),[],MO2F_VERSION );
482
+ wp_enqueue_script( 'murmur_script', plugins_url( 'includes/js/rba/js/murmurhash3.js', __FILE__ ),[],MO2F_VERSION );
483
+ wp_enqueue_script( 'miniorange_script', plugins_url( 'includes/js/rba/js/miniorange-fp.js', __FILE__ ),[],MO2F_VERSION );
484
  }
485
  else if( get_site_option('mo2f_enable_2fa_prompt_on_login_page'))
486
  {
607
  $tfa_enabled = $Mo2fdbQueries->get_user_detail( 'mo2f_2factor_enable_2fa_byusers', $user_object->ID );
608
  $mo_2factor_user_registration_status = $Mo2fdbQueries->get_user_detail( 'mo_2factor_user_registration_status', $user_object->ID );
609
 
610
+ if($tfa_enabled != 0 && ($mo_2factor_user_registration_status != 'MO_2_FACTOR_PLUGIN_SETTINGS') && $tfa_enabled != '')
611
  $mo2f_configured_2FA_method = 1;
612
  if ( current_user_can( 'administrator', $user_object->ID ) && $mo2f_configured_2FA_method ) {
613
  if(get_current_user_id() != $user_object->ID){
742
  delete_user_meta($user_id,'mo2f_whatsapp_id');
743
  $Mo2fdbQueries->delete_user_details( $user_id);
744
  delete_user_meta($user_id,'mo2f_2FA_method_to_test');
745
+ update_site_option('mo2f_user_login_status_'.$user_id,0);
746
+ delete_site_option('mo2f_grace_period_status_'.$user_id);
747
 
748
  }
749
  }
750
  }
751
+
 
752
  }
753
 
754
  function mo2f_mapped_email_column_content($value, $column_name, $user_id) {
811
  {
812
  wp_mail( $email,$subject,$messages,$headers);
813
  }
814
+ if(get_option('mo_wpns_2fa_with_network_security'))
815
+ {
816
+
817
+ global $imagePath;
818
+
819
+ $subject = 'Website Security Features will be removed from next update !';
820
+ $headers = array('Content-Type: text/html; charset=UTF-8');
821
+ $email = get_option('admin_email');;
822
+ $message = '<table cellpadding="25" style="margin:0px auto">
823
+ <tbody>
824
+ <td>
825
+ <td>
826
+ <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
827
+ <tbody>
828
+ <td>
829
+ <td><img src="'.$imagePath.'includes/images/xecurify-logo.png" alt="Xecurify" style="color:#5fb336;text-decoration:none;display:block;width:auto;height:auto;max-height:35px" class="CToWUd"></td>
830
+ </tr>
831
+ </tbody>
832
+ </table>
833
+ <table cellpadding="24" style="background:#fff;border:1px solid #a8adad;width:584px;border-top:none;color:#4d4b48;font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">
834
+ <tbody>
835
+ <td>
836
+ <td>
837
+ <p style="margin-top:0;margin-bottom:20px">Dear Customer,</p>
838
+ <p style="margin-top:0;margin-bottom:20px"><b> Website Security Features </b>will be removed from next update <img src="'.$imagePath.'includes/images/warning.png" style="width:20px"> from <a href="https://wordpress.org/plugins/miniorange-2-factor-authentication/" class="mo-limit-login-link"><u><b>Google Authenticator plugin</b></u></a>.</p>
839
+ <p style="margin-top:0;margin-bottom:10px">You can download our <a href="https://wordpress.org/plugins/miniorange-limit-login-attempts/" class="mo-limit-login-link"><u><b>Limit Login Attempts plugin</b></u></a> for using Website Security Features.</p>
840
+ <p style="margin-top:0;margin-bottom:20px">For more information, you can contact us directly at 2fasupport@xecurify.com.</p>
841
+ <p style="margin-top:0;margin-bottom:15px">Thank you,<br>miniOrange Team</p>
842
+ <p style="margin-top:0;margin-bottom:0px;font-size:11px">Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.</p>
843
+ </div></div></td>
844
+ </tr>
845
+ </tbody>
846
+ </table>
847
+ </td>
848
+ </tr>
849
+ </tbody>
850
+ </table>';
851
+
852
+ if(empty($email))
853
+ {
854
+ $user = wp_get_current_user();
855
+ $email = $user->user_email;
856
+ }
857
+ if(is_email($email))
858
+ {
859
+
860
+ wp_mail( $email,$subject,$message,$headers);
861
+ }
862
+
863
+ }
864
+
865
+
866
  }
867
 
868
  new Miniorange_twoFactor;
readme.txt CHANGED
@@ -4,9 +4,9 @@ Contributors: twofactor, twofactorauthentication, hsn97,cyberlord92
4
  Tags: google authenticator, two-factor, two-factor authentication, OTP Authentication, 2FA , wp 2fa, 2-factor authentication, multi-factor authentication, MFA, Remember Device, OTP Over Telegram, passwordless login, email verification, Security Questions, FIDO, FIDO2, Webauthn, SMS login, OTP Over SMS and Email, OTP over Whatsapp, Whatsapp 2FA, QR Code Authentication, WordPress Authentication.
5
  Donate link: https://miniorange.com/
6
  Requires at least: 3.0.1
7
- Tested up to: 6.0.2
8
  Requires PHP: 5.3.0
9
- Stable tag: 5.6.2
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -20,7 +20,7 @@ USERS DON'T REQUIRE ACCESS TO THE WORDPRESS DASHBOARD TO SET UP 2FA making it ex
20
 
21
  Check out following video to configure google authenticator as a 2fa:
22
 
23
- [youtube https://youtu.be/6je2iARqrcs]
24
 
25
  [Features](https://plugins.miniorange.com/2-factor-authentication-for-wordpress-wp-2fa?utm_source=wordpress&utm_medium=readme+link&utm_campaign=last+June#key-features) | [7 day Premium trial](https://plugins.miniorange.com/wordpress-2fa-free-trial-request)
26
 
@@ -219,6 +219,14 @@ You should go to <b>Setup Two-Factor (2FA) </b> Tab and click on <b>Reconfigure<
219
 
220
  == Changelog ==
221
 
 
 
 
 
 
 
 
 
222
  = 5.6.2 =
223
  * Google Authenticator - Two factor Authentication (2FA, OTP) :
224
  * Vulnerability fixes
@@ -234,6 +242,14 @@ For older changelog entries, please see the [additional changelog.txt file](http
234
 
235
  == Upgrade Notice ==
236
 
 
 
 
 
 
 
 
 
237
  = 5.6.2 =
238
  * Google Authenticator - Two factor Authentication (2FA, OTP) :
239
  * Vulnerability fixes
4
  Tags: google authenticator, two-factor, two-factor authentication, OTP Authentication, 2FA , wp 2fa, 2-factor authentication, multi-factor authentication, MFA, Remember Device, OTP Over Telegram, passwordless login, email verification, Security Questions, FIDO, FIDO2, Webauthn, SMS login, OTP Over SMS and Email, OTP over Whatsapp, Whatsapp 2FA, QR Code Authentication, WordPress Authentication.
5
  Donate link: https://miniorange.com/
6
  Requires at least: 3.0.1
7
+ Tested up to: 6.0.3
8
  Requires PHP: 5.3.0
9
+ Stable tag: 5.6.3
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
20
 
21
  Check out following video to configure google authenticator as a 2fa:
22
 
23
+ [youtube https://youtu.be/_nkMCkxLcIs]
24
 
25
  [Features](https://plugins.miniorange.com/2-factor-authentication-for-wordpress-wp-2fa?utm_source=wordpress&utm_medium=readme+link&utm_campaign=last+June#key-features) | [7 day Premium trial](https://plugins.miniorange.com/wordpress-2fa-free-trial-request)
26
 
219
 
220
  == Changelog ==
221
 
222
+ = 5.6.3 =
223
+ * Google Authenticator - Two factor Authentication (2FA, OTP) :
224
+ * Skip-2 factor option removed from inline setup
225
+ * Backup code button will always be shown
226
+ * Added login form and theme fields in trial request form
227
+ * CSS-JS version added for all scripts and styles respectively
228
+ * Autofocus for many input fields and submit form when Enter is hit
229
+
230
  = 5.6.2 =
231
  * Google Authenticator - Two factor Authentication (2FA, OTP) :
232
  * Vulnerability fixes
242
 
243
  == Upgrade Notice ==
244
 
245
+ = 5.6.3 =
246
+ * Google Authenticator - Two factor Authentication (2FA, OTP) :
247
+ * Skip-2 factor option removed from inline setup
248
+ * Backup code button will always be shown
249
+ * Added login form and theme fields in trial request form
250
+ * CSS-JS version added for all scripts and styles respectively
251
+ * Autofocus for many input fields and submit form when Enter is hit
252
+
253
  = 5.6.2 =
254
  * Google Authenticator - Two factor Authentication (2FA, OTP) :
255
  * Vulnerability fixes
uninstall.php CHANGED
@@ -12,38 +12,23 @@
12
  }
13
  update_option('mo2f_activate_plugin', 1);
14
 
15
- delete_option('mo2f_trial_dismiss');
16
- delete_option('mo2f_donot_show_trial_notice_always');
17
- delete_option('mo2f_wizard_selected_method');
18
 
19
- delete_option('mo2f_customerKey');
20
- delete_option('mo2f_api_key');
21
- delete_option('mo2f_customer_token');
22
  delete_option('mo_wpns_transactionId');
23
  delete_option('mo_wpns_registration_status');
24
-
25
- delete_option('mo2f_customerKey');
26
- delete_option('mo2f_api_key');
27
- delete_option('mo_wpns_customer_token');
28
- delete_option('mo2f_app_secret');
29
  delete_option('mo_wpns_message');
30
  delete_option('mo_wpns_transactionId');
31
  delete_option('mo_wpns_registration_status');
32
- delete_site_option('mo2f_setup_complete');
33
  delete_site_option('EmailTransactionCurrent');
34
- delete_site_option('mo2f_realtime_ip_block_free');
35
- delete_site_option('mo2f_added_ips_realtime');
36
- delete_site_option('mo2f_mail_notify_new_release');
37
- delete_site_option('mo2f_mail_notify');
38
  delete_site_option('mo2fa_free_plan_new_user_methods');
39
  delete_site_option('mo2fa_free_plan_existing_user_methods');
40
- delete_site_option("mo2f_banner_never_show_again");
41
  delete_option('mo2fa_reconfiguration_via_email');
42
  delete_option('mo2fa_userProfile_method');
43
- delete_site_option('mo2f_feature_vers');
44
- delete_site_option('mo2f_is_inline_used');
45
- delete_site_option('mo2f_login_with_mfa_use');
46
- delete_site_option('mo2f_user_IP');
47
  delete_option('mo_wpns_enable_brute_force');
48
  delete_option('mo_wpns_show_remaining_attempts');
49
  delete_option('mo_wpns_enable_ip_blocked_email_to_admin');
@@ -53,9 +38,9 @@
53
  delete_option( 'mo_wpns_firstName' );
54
  delete_option( 'mo_wpns_lastName');
55
  delete_option( 'mo_wpns_password');
56
- delete_option( 'mo2f_email');
57
  delete_option( 'mo_wpns_admin_phone');
58
- delete_option( 'mo2f_tour_started');
59
 
60
  delete_option( 'mo_wpns_registration_status');
61
  delete_option( 'mo_wpns_block_chrome');
@@ -65,28 +50,18 @@
65
  delete_option( 'mo_wpns_block_opera');
66
  delete_option( 'mo_wpns_block_edge');
67
  delete_site_option(base64_encode("totalUsersCloud"));
68
- delete_site_option('mo2f_inline_registration');
69
  delete_option('mo_2factor_user_registration_status');
70
- delete_site_option( 'mo2f_GA_account_name');
71
-
72
  delete_option( 'mo_2f_switch_all');
73
- delete_option( 'mo2f_login_option');
74
  delete_option( 'mo_wpns_scan_initialize');
75
- delete_site_option( 'mo2f_planname');
76
  delete_site_option( 'mo_2fa_plan_type');
77
  delete_site_option( 'mo_2fa_addon_plan_type');
78
- delete_option( 'mo2f_activated_time');
79
- delete_option( 'mo2f_number_of_transactions');
80
- delete_option( 'mo2f_set_transactions');
81
  delete_site_option('cmVtYWluaW5nT1RQVHJhbnNhY3Rpb25z');
82
- delete_option( 'mo2f_enable_xmlrpc');
83
- delete_option( 'mo2f_scan_initialize');
84
- delete_option( 'mo2f_scan_nonce');
85
- delete_option( 'mo2f_onprem_admin');
86
- delete_option( 'mo2f_two_factor_tour');
87
- delete_option( 'mo2f_tab_count');
88
- delete_option( 'mo2f_attempts_before_redirect');
89
- delete_option( 'mo2f_register_with_another_email');
90
  delete_option( 'mo_wpns_enable_htaccess_blocking');
91
  delete_option( 'mo_wpns_enable_user_agent_blocking');
92
  delete_option( 'mo_wpns_countrycodes');
@@ -101,13 +76,10 @@
101
  delete_option('mo_wpns_2fa_with_network_security_popup_visible');
102
 
103
  delete_option( 'mo_wpns_slow_down_attacks');
104
- delete_option( 'mo2f_enforce_strong_passswords');
105
- delete_option( 'mo2f_enforce_strong_passswords_for_accounts');
106
 
107
  delete_option( 'mo_wpns_enable_2fa');
108
- delete_option( 'mo2f_activate_plugin');
109
-
110
- delete_option( 'mo2f_deviceid_enabled');
111
  delete_option( 'mo_wpns_activate_recaptcha');
112
 
113
  delete_option( 'mo_wpns_activate_recaptcha_for_login');
@@ -138,16 +110,9 @@
138
  delete_option('mo_wpns_dbversion');
139
 
140
  delete_site_option('mo2fa_superadmin');
141
- delete_site_option('mo2f_visit_waf');
142
- delete_site_option('mo2f_visit_login_and_spam');
143
- delete_site_option('mo2f_visit_malware');
144
- delete_site_option('mo2f_two_factor');
145
- delete_site_option('mo2f_enable_debug_log');
146
  delete_site_option('duo_credentials_save_successfully');
147
- delete_site_option('mo2f_d_integration_key');
148
- delete_site_option('mo2f_d_secret_key');
149
- delete_site_option('mo2f_d_api_hostname');
150
- delete_site_option('mo2f_nonce_enable_configured_methods');
151
  if(get_option('is_onprem'))
152
  {
153
  $users = get_users( array() );
@@ -195,6 +160,8 @@
195
  }
196
 
197
  //drop custom db tables
 
 
198
  global $wpdb;
199
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_transactions" );
200
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_blocked_ips" );
@@ -206,6 +173,7 @@
206
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_malware_hash_file" );
207
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_attack_logs" );
208
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_ip_rate_details" );
 
209
 
210
  // Remove all values of 2FA on deactivate
211
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}mo2f_user_details" );
@@ -219,69 +187,23 @@
219
 
220
  if ( ! is_multisite() )
221
  {
222
- delete_option( 'mo2f_email' );
223
- delete_option( 'mo2f_host_name' );
224
  delete_option( 'user_phone' );
225
- delete_option( 'mo2f_customerKey' );
226
- delete_option( 'mo2f_api_key' );
227
- delete_option( 'mo2f_customer_token' );
228
- delete_option( 'mo2f_message' );
229
  delete_option( 'mo_2factor_admin_registration_status' );
230
- delete_option( 'mo2f_login_message' );
231
  delete_option( 'mo_2f_login_type_enabled' );
232
- delete_option( 'mo2f_admin_disabled_status' );
233
- delete_option( 'mo2f_disabled_status' );
234
- delete_option( 'mo2f_miniorange_admin' );
235
- delete_option( 'mo2f_enable_forgotphone' );
236
- delete_option( 'mo2f_enable_login_with_2nd_factor' );
237
- delete_option( 'mo2f_activate_plugin' );
238
- delete_option( 'mo2f_remember_device' );
239
- delete_option( 'mo2f_app_secret' );
240
- delete_option( 'mo2f_enable_custom' );
241
- delete_option( 'mo2f_show_sms_transaction_message' );
242
- delete_option( 'mo2f_admin_first_name' );
243
  delete_option( 'mo2_admin_last_name' );
244
- delete_option( 'mo2f_admin_company' );
245
- delete_option( 'mo2f_proxy_host' );
246
- delete_option( 'mo2f_port_number' );
247
- delete_option( 'mo2f_proxy_username' );
248
- delete_option( 'mo2f_proxy_password' );
249
- delete_option( 'mo2f_auth_methods_for_users' );
250
- delete_option( 'mo2f_enable_mobile_support' );
251
- delete_option( 'mo2f_login_policy' );
252
- delete_option( 'mo2f_msg_counter' );
253
- delete_option( 'mo2f_modal_display' );
254
- delete_option( 'mo2f_disable_poweredby' );
255
- delete_option( 'mo2f_new_customer' );
256
- delete_option( 'mo2f_enable_2fa_for_users' );
257
- delete_option( 'mo2f_phone' );
258
- delete_option( 'mo2f_existing_user_values_updated' );
259
- delete_option( 'mo2f_login_option_updated' );
260
- delete_option( 'mo2f_bug_fix_done' );
261
- delete_option( 'mo2f_feedback_form' );
262
- delete_site_option( 'mo2f_enable_2fa_prompt_on_login_page' );
263
- delete_option( 'mo2f_configured_2_factor_method' );
264
- delete_option( 'mo2f_enable_2fa' );
265
  delete_option( 'kba_questions' );
266
- delete_option( 'mo2f_customer_selected_plan' );
267
- delete_option( 'mo2f_admin_first_name' );
268
  delete_option( 'mo2_admin_last_name' );
269
- delete_option( 'mo2f_admin_company' );
270
- delete_option( 'mo2f_db_option_updated' );
271
- delete_option( 'mo2f_login_option_updated' );
272
- delete_option( 'mo2f_encryption_key' );
273
- delete_option( 'mo2f_google_appname' );
274
- //Network Security
275
- delete_option( 'mo2f_ns_whitelist_ip' );
276
- delete_option( 'mo2f_enable_brute_force' );
277
- delete_option( 'mo2f_show_remaining_attempts' );
278
- delete_option( 'mo2f_ns_blocked_ip' );
279
- delete_option( 'mo2f_allwed_login_attempts' );
280
- delete_option( 'mo2f_time_of_blocking_type' );
281
- delete_option( 'mo2f_network_features' );
282
 
283
 
284
- delete_option( 'mo2f_custom_plugin_name' );
285
  delete_option( 'SQLInjection' );
286
  delete_site_option( 'WAF');
287
  delete_site_option( 'WAFEnabled' );
@@ -295,15 +217,12 @@
295
  delete_option( 'limitAttack' );
296
  delete_option( 'skip_tour' );
297
  delete_option( 'mo_wpns_new_registration' );
298
- delete_option( 'mo2f_is_NC' );
299
 
300
- delete_site_option( 'mo2f_wpns_sms_dismiss');
301
- delete_site_option( 'mo2f_wpns_email_dismiss');
302
- delete_site_option( 'mo2f_wpns_donot_show_low_email_notice');
303
- delete_site_option( 'mo2f_wpns_donot_show_low_sms_notice');
304
 
305
  delete_option( 'mo_wpns_enable_log_requests' );
306
- delete_option( 'mo2f_data_storage' );
307
  delete_option( 'mo_wpns_scan_files_extensions' );
308
  delete_option( 'donot_show_feedback_message' );
309
  delete_option( 'mo_wpns_enable_rename_login_url' );
@@ -312,7 +231,7 @@
312
  delete_option( 'mo_wpns_malware_scan_in_progress' );
313
  delete_option( 'scan_failed' );
314
  delete_option( 'recovery_mode_email_last_sent' );
315
- delete_option( 'mo2f_is_NNC' );
316
 
317
 
318
  //delete all stored key-value pairs for the roles
@@ -329,14 +248,11 @@
329
  delete_option( 'mo_2factor_admin_mobile_registration_status' );
330
  delete_option( 'mo_2factor_registration_status' );
331
  delete_option( 'mo_2factor_temp_status' );
332
- delete_option( 'mo2f_login_username' );
333
- delete_option( 'mo2f-login-qrCode' );
334
- delete_option( 'mo2f_transactionId' );
335
  delete_option( 'mo_2factor_login_status' );
336
- delete_option( 'mo2f_configured_2_factor_method' );
337
- delete_option( 'mo2f_enable_2fa' );
338
  delete_option( 'kba_questions' );
339
- delete_option( 'mo2f_customerKey' );
340
 
341
  delete_option( 'mo_2f_switch_waf');
342
  delete_option( 'mo_2f_switch_loginspam');
@@ -351,5 +267,5 @@
351
  delete_option( 'donot_show_infected_file_notice');
352
  delete_option( 'donot_show_new_plugin_theme_notice');
353
  delete_option( 'donot_show_weekly_scan_notice');
354
- delete_option( 'mo2f_user_sync');
355
  ?>
12
  }
13
  update_option('mo2f_activate_plugin', 1);
14
 
 
 
 
15
 
 
 
 
16
  delete_option('mo_wpns_transactionId');
17
  delete_option('mo_wpns_registration_status');
18
+ delete_option('mo_wpns_customer_token');
19
+
 
 
 
20
  delete_option('mo_wpns_message');
21
  delete_option('mo_wpns_transactionId');
22
  delete_option('mo_wpns_registration_status');
23
+
24
  delete_site_option('EmailTransactionCurrent');
25
+
 
 
 
26
  delete_site_option('mo2fa_free_plan_new_user_methods');
27
  delete_site_option('mo2fa_free_plan_existing_user_methods');
28
+
29
  delete_option('mo2fa_reconfiguration_via_email');
30
  delete_option('mo2fa_userProfile_method');
31
+
 
 
 
32
  delete_option('mo_wpns_enable_brute_force');
33
  delete_option('mo_wpns_show_remaining_attempts');
34
  delete_option('mo_wpns_enable_ip_blocked_email_to_admin');
38
  delete_option( 'mo_wpns_firstName' );
39
  delete_option( 'mo_wpns_lastName');
40
  delete_option( 'mo_wpns_password');
41
+
42
  delete_option( 'mo_wpns_admin_phone');
43
+
44
 
45
  delete_option( 'mo_wpns_registration_status');
46
  delete_option( 'mo_wpns_block_chrome');
50
  delete_option( 'mo_wpns_block_opera');
51
  delete_option( 'mo_wpns_block_edge');
52
  delete_site_option(base64_encode("totalUsersCloud"));
53
+
54
  delete_option('mo_2factor_user_registration_status');
55
+
 
56
  delete_option( 'mo_2f_switch_all');
57
+
58
  delete_option( 'mo_wpns_scan_initialize');
59
+
60
  delete_site_option( 'mo_2fa_plan_type');
61
  delete_site_option( 'mo_2fa_addon_plan_type');
62
+
 
 
63
  delete_site_option('cmVtYWluaW5nT1RQVHJhbnNhY3Rpb25z');
64
+
 
 
 
 
 
 
 
65
  delete_option( 'mo_wpns_enable_htaccess_blocking');
66
  delete_option( 'mo_wpns_enable_user_agent_blocking');
67
  delete_option( 'mo_wpns_countrycodes');
76
  delete_option('mo_wpns_2fa_with_network_security_popup_visible');
77
 
78
  delete_option( 'mo_wpns_slow_down_attacks');
79
+
 
80
 
81
  delete_option( 'mo_wpns_enable_2fa');
82
+
 
 
83
  delete_option( 'mo_wpns_activate_recaptcha');
84
 
85
  delete_option( 'mo_wpns_activate_recaptcha_for_login');
110
  delete_option('mo_wpns_dbversion');
111
 
112
  delete_site_option('mo2fa_superadmin');
113
+
 
 
 
 
114
  delete_site_option('duo_credentials_save_successfully');
115
+
 
 
 
116
  if(get_option('is_onprem'))
117
  {
118
  $users = get_users( array() );
160
  }
161
 
162
  //drop custom db tables
163
+ if(!class_exists('WPSecurityPro'))
164
+ {
165
  global $wpdb;
166
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_transactions" );
167
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_blocked_ips" );
173
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_malware_hash_file" );
174
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_attack_logs" );
175
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpns_ip_rate_details" );
176
+ }
177
 
178
  // Remove all values of 2FA on deactivate
179
  $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}mo2f_user_details" );
187
 
188
  if ( ! is_multisite() )
189
  {
190
+
 
191
  delete_option( 'user_phone' );
192
+
 
 
 
193
  delete_option( 'mo_2factor_admin_registration_status' );
194
+
195
  delete_option( 'mo_2f_login_type_enabled' );
196
+
 
 
 
 
 
 
 
 
 
 
197
  delete_option( 'mo2_admin_last_name' );
198
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  delete_option( 'kba_questions' );
200
+
 
201
  delete_option( 'mo2_admin_last_name' );
202
+
203
+
 
 
 
 
 
 
 
 
 
 
 
204
 
205
 
206
+
207
  delete_option( 'SQLInjection' );
208
  delete_site_option( 'WAF');
209
  delete_site_option( 'WAFEnabled' );
217
  delete_option( 'limitAttack' );
218
  delete_option( 'skip_tour' );
219
  delete_option( 'mo_wpns_new_registration' );
220
+
221
 
222
+
 
 
 
223
 
224
  delete_option( 'mo_wpns_enable_log_requests' );
225
+
226
  delete_option( 'mo_wpns_scan_files_extensions' );
227
  delete_option( 'donot_show_feedback_message' );
228
  delete_option( 'mo_wpns_enable_rename_login_url' );
231
  delete_option( 'mo_wpns_malware_scan_in_progress' );
232
  delete_option( 'scan_failed' );
233
  delete_option( 'recovery_mode_email_last_sent' );
234
+
235
 
236
 
237
  //delete all stored key-value pairs for the roles
248
  delete_option( 'mo_2factor_admin_mobile_registration_status' );
249
  delete_option( 'mo_2factor_registration_status' );
250
  delete_option( 'mo_2factor_temp_status' );
251
+
 
 
252
  delete_option( 'mo_2factor_login_status' );
253
+
 
254
  delete_option( 'kba_questions' );
255
+
256
 
257
  delete_option( 'mo_2f_switch_waf');
258
  delete_option( 'mo_2f_switch_loginspam');
267
  delete_option( 'donot_show_infected_file_notice');
268
  delete_option( 'donot_show_new_plugin_theme_notice');
269
  delete_option( 'donot_show_weekly_scan_notice');
270
+
271
  ?>
views/class-setup-wizard.php CHANGED
@@ -391,7 +391,13 @@ class Mo2f_Setup_Wizard {
391
  foreach($settings as $setting => $value){
392
  $setting = sanitize_text_field($setting);
393
  $value = sanitize_text_field($value);
394
- update_site_option($setting,$value);
 
 
 
 
 
 
395
  }
396
  $wp_roles = new WP_Roles();
397
  if(isset($settings['mo2f-enforcement-policy']) && $settings['mo2f-enforcement-policy'] == 'mo2f-all-users'){
@@ -418,25 +424,25 @@ class Mo2f_Setup_Wizard {
418
  $grace_max = 10;
419
  }
420
  ?>
421
- <h3><?php esc_html_e( 'How long should the grace period for your users be?', 'miniorange-2-factor-authentication' ); ?></h3>
422
- <p class="mo2f_description"><?php esc_html_e( 'When you configure the 2FA policies and require users to configure 2FA, they can either have a grace period to configure 2FA (users who don\'t have 2fa setup after grace period will be locked out), or users can setup 2FA anytime they want. Choose which method you\'d like to use:', 'miniorange-2-factor-authentication' ); ?></p>
423
  <fieldset class="mo2f-contains-hidden-inputs">
424
  <label for="mo2f-no-grace-period" style="margin-bottom: 10px; display: block;">
425
  <input type="radio" name="mo2f_policy[mo2f_grace_period]" id="mo2f-no-grace-period" value="off"
426
  <?php checked( get_site_option( 'mo2f_grace_period' ), 'off' ); ?>
427
  >
428
- <span><?php esc_html_e( 'Users can configure 2FA anytime they want', 'miniorange-2-factor-authentication' ); ?></span>
429
  </label>
430
 
431
  <label for="mo2f-use-grace-period">
432
  <input type="radio" name="mo2f_policy[mo2f_grace_period]" id="mo2f-use-grace-period" value="on"
433
  <?php checked( get_site_option( 'mo2f_grace_period' ), 'on' ); ?>
434
  data-unhide-when-checked=".mo2f-grace-period-inputs">
435
- <span><?php esc_html_e( 'Give users a grace period to configure 2FA (Users have to configure 2FA within given time to avoid lockout)', 'miniorange-2-factor-authentication' ); ?></span>
436
  </label>
437
  <fieldset class="mo2f-grace-period-inputs" <?php if(get_site_option( 'mo2f_grace_period' )) {echo "hidden";}?> hidden>
438
  <br/>
439
- <input type="number" id="mo2f-grace-period" name="mo2f_policy[mo2f_grace_period_value]" value="<?php echo ($grace_period)?esc_attr( $grace_period ):1; ?>" min="1" max="<?php echo esc_attr( $grace_max ); ?>">
440
  <label class="radio-inline">
441
  <input class="js-nested" type="radio" name="mo2f_policy[mo2f_grace_period_type]" value="hours"
442
  <?php checked( get_site_option( 'mo2f_grace_period_type' ), 'hours' ); ?>
@@ -483,6 +489,20 @@ class Mo2f_Setup_Wizard {
483
  </fieldset>
484
  <br/>
485
  </fieldset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
  <?php
487
  }
488
  }
391
  foreach($settings as $setting => $value){
392
  $setting = sanitize_text_field($setting);
393
  $value = sanitize_text_field($value);
394
+
395
+ if($setting =='mo2f_grace_period_value')
396
+ {
397
+ update_site_option($setting,($value<=10 and $value>0)?floor($value):1);
398
+ }else{
399
+ update_site_option($setting,$value);
400
+ }
401
  }
402
  $wp_roles = new WP_Roles();
403
  if(isset($settings['mo2f-enforcement-policy']) && $settings['mo2f-enforcement-policy'] == 'mo2f-all-users'){
424
  $grace_max = 10;
425
  }
426
  ?>
427
+ <h3><?php esc_html_e( 'Should users be given a grace period or should they be directly enforced for 2FA setup?', 'miniorange-2-factor-authentication' ); ?></h3>
428
+ <p class="mo2f_description"><?php esc_html_e( 'When you configure the 2FA policies and require users to configure 2FA, they can either have a grace period to configure 2FA (users who don\'t have 2fa setup after grace period, will be enforced to setup 2FA ). Choose which method you\'d like to use:', 'miniorange-2-factor-authentication' ); ?></p>
429
  <fieldset class="mo2f-contains-hidden-inputs">
430
  <label for="mo2f-no-grace-period" style="margin-bottom: 10px; display: block;">
431
  <input type="radio" name="mo2f_policy[mo2f_grace_period]" id="mo2f-no-grace-period" value="off"
432
  <?php checked( get_site_option( 'mo2f_grace_period' ), 'off' ); ?>
433
  >
434
+ <span><?php esc_html_e( 'Users should be directly enforced for 2FA setup.', 'miniorange-2-factor-authentication' ); ?></span>
435
  </label>
436
 
437
  <label for="mo2f-use-grace-period">
438
  <input type="radio" name="mo2f_policy[mo2f_grace_period]" id="mo2f-use-grace-period" value="on"
439
  <?php checked( get_site_option( 'mo2f_grace_period' ), 'on' ); ?>
440
  data-unhide-when-checked=".mo2f-grace-period-inputs">
441
+ <span><?php esc_html_e( 'Give users a grace period to configure 2FA (Users will be enforced to setup 2FA after grace period expiry).', 'miniorange-2-factor-authentication' ); ?></span>
442
  </label>
443
  <fieldset class="mo2f-grace-period-inputs" <?php if(get_site_option( 'mo2f_grace_period' )) {echo "hidden";}?> hidden>
444
  <br/>
445
+ <input type="number" id="mo2f-grace-period" name="mo2f_policy[mo2f_grace_period_value]" value="<?php echo (get_site_option('mo2f_grace_period_value') )?esc_attr( get_site_option('mo2f_grace_period_value') ):1; ?>" min="1" max="<?php echo esc_attr( $grace_max ); ?>">
446
  <label class="radio-inline">
447
  <input class="js-nested" type="radio" name="mo2f_policy[mo2f_grace_period_type]" value="hours"
448
  <?php checked( get_site_option( 'mo2f_grace_period_type' ), 'hours' ); ?>
489
  </fieldset>
490
  <br/>
491
  </fieldset>
492
+ <script>
493
+ jQuery(document).ready(function($){
494
+ jQuery("#mo2f-use-grace-period").click(function()
495
+ {
496
+
497
+ jQuery("#mo2f-grace-period").focus();
498
+ });
499
+ jQuery(".radio-inline").click(function()
500
+ {
501
+
502
+ jQuery("#mo2f-grace-period").focus();
503
+ });
504
+ });
505
+ </script>
506
  <?php
507
  }
508
  }
views/common-elements.php CHANGED
@@ -73,28 +73,7 @@
73
  <?php
74
  }
75
 
76
- echo '</td><td>';
77
-
78
- if(get_site_option('mo2f_is_user_blocked_'.$user->ID))
79
- {
80
- update_site_option('mo2f_unblock_user_id',$user->ID);
81
- ?>
82
- <form action="" method="post" id="mo2f_unblock_form" >
83
- <input type="hidden" name="mo2f_unblock_form_nonce" value="<?php echo esc_html(wp_create_nonce("mo2f-unblock-form-nonce"))?>">
84
- <input type="hidden" value="<?php echo esc_attr('mo2f_unblock_user_'.$user->ID) ?>" name="option">
85
-
86
- <div id="<?php echo esc_attr('mo2f_submit_button_'.$user->ID)?>">
87
- <input type="submit" name="<?php echo esc_attr('mo2f_unblock_user_'.$user->ID)?>" value="Unblock User" class="button button-primary button-large " />
88
- </div>
89
- </form>
90
- <?php
91
-
92
-
93
-
94
- }
95
-
96
-
97
- echo' </td> </tr>';
98
  }
99
  else
100
  {
@@ -109,7 +88,7 @@
109
  {
110
  $site_k=get_option('mo_wpns_recaptcha_site_key_v3');
111
 
112
- wp_register_script( 'mo2f_recaptcha','https://www.google.com/recaptcha/api.js?render='.get_option("mo_wpns_recaptcha_site_key_v3"));
113
  wp_enqueue_script('mo2f_recaptcha');
114
  echo'
115
  <div class="g-recaptcha-response" data-sitekey="'.esc_html($site_k).'"></div>
@@ -135,7 +114,7 @@
135
  //Function to show google recaptcha v2 form
136
  function show_google_recaptcha_form_v2_login()
137
  {
138
- wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
139
  wp_enqueue_script( 'mo2f_catpcha_js' );
140
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
141
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
@@ -144,13 +123,13 @@
144
 
145
  function show_google_recaptcha_form_v2()
146
  {
147
- wp_register_style('mo2f_admin_css',site_url().'/wp-admin/load-styles.php?c=1&amp;dir=ltr&amp;load%5B%5D=dashicons,admin-bar,common,forms,admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menus,widgets,site-icon,&amp;load%5B%5D=l10n,buttons,wp-auth-check&amp;ver=4.5.2"/>');
148
- wp_register_style( 'mo2f_style_settings',plugins_url( 'includes/css/style_settings.css?version=5.5', dirname(__FILE__)));
149
 
150
  wp_print_styles('mo2f_admin_css');
151
  wp_print_styles( 'mo2f_style_settings' );
152
 
153
- wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
154
  wp_enqueue_script( 'mo2f_catpcha_js' );
155
 
156
  echo '<div style="font-family:\'Open Sans\',sans-serif;margin:0px auto;width:303px;text-align:center;">
@@ -170,13 +149,13 @@
170
  {
171
  $site_k=get_option('mo_wpns_recaptcha_site_key_v3');
172
 
173
- wp_register_style('mo2f_admin_css',site_url().'/wp-admin/load-styles.php?c=1&amp;dir=ltr&amp;load%5B%5D=dashicons,admin-bar,common,forms,admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menus,widgets,site-icon,&amp;load%5B%5D=l10n,buttons,wp-auth-check&amp;ver=4.5.2"/>');
174
- wp_register_style( 'mo2f_style_settings',plugins_url( 'includes/css/style_settings.css?version=5.5', dirname(__FILE__)));
175
 
176
  wp_print_styles('mo2f_admin_css');
177
  wp_print_styles( 'mo2f_style_settings' );
178
 
179
- wp_register_script( 'mo2f_recaptcha','https://www.google.com/recaptcha/api.js?render='.get_option("mo_wpns_recaptcha_site_key_v3"));
180
  wp_enqueue_script('mo2f_recaptcha');
181
  echo'
182
  <div style="font-family:\'Open Sans\',sans-serif;margin:0px auto;width:303px;text-align:center;">
73
  <?php
74
  }
75
 
76
+ echo '</td> </tr>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  }
78
  else
79
  {
88
  {
89
  $site_k=get_option('mo_wpns_recaptcha_site_key_v3');
90
 
91
+ wp_register_script( 'mo2f_recaptcha','https://www.google.com/recaptcha/api.js?render='.get_option("mo_wpns_recaptcha_site_key_v3"),[],MO2F_VERSION);
92
  wp_enqueue_script('mo2f_recaptcha');
93
  echo'
94
  <div class="g-recaptcha-response" data-sitekey="'.esc_html($site_k).'"></div>
114
  //Function to show google recaptcha v2 form
115
  function show_google_recaptcha_form_v2_login()
116
  {
117
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL),[],MO2F_VERSION);
118
  wp_enqueue_script( 'mo2f_catpcha_js' );
119
  echo '<div class="g-recaptcha" data-sitekey="'.esc_html(get_option("mo_wpns_recaptcha_site_key")).'"></div>';
120
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
123
 
124
  function show_google_recaptcha_form_v2()
125
  {
126
+ wp_register_style('mo2f_admin_css',site_url().'/wp-admin/load-styles.php?c=1&amp;dir=ltr&amp;load%5B%5D=dashicons,admin-bar,common,forms,admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menus,widgets,site-icon,&amp;load%5B%5D=l10n,buttons,wp-auth-check&amp;ver=4.5.2"/>',[],MO2F_VERSION);
127
+ wp_register_style( 'mo2f_style_settings',plugins_url( 'includes/css/style_settings.css', dirname(__FILE__)),[],MO2F_VERSION);
128
 
129
  wp_print_styles('mo2f_admin_css');
130
  wp_print_styles( 'mo2f_style_settings' );
131
 
132
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL),[],MO2F_VERSION);
133
  wp_enqueue_script( 'mo2f_catpcha_js' );
134
 
135
  echo '<div style="font-family:\'Open Sans\',sans-serif;margin:0px auto;width:303px;text-align:center;">
149
  {
150
  $site_k=get_option('mo_wpns_recaptcha_site_key_v3');
151
 
152
+ wp_register_style('mo2f_admin_css',site_url().'/wp-admin/load-styles.php?c=1&amp;dir=ltr&amp;load%5B%5D=dashicons,admin-bar,common,forms,admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menus,widgets,site-icon,&amp;load%5B%5D=l10n,buttons,wp-auth-check&amp;ver=4.5.2"/>',[],MO2F_VERSION);
153
+ wp_register_style( 'mo2f_style_settings',plugins_url( 'includes/css/style_settings.css', dirname(__FILE__)),[],MO2F_VERSION);
154
 
155
  wp_print_styles('mo2f_admin_css');
156
  wp_print_styles( 'mo2f_style_settings' );
157
 
158
+ wp_register_script( 'mo2f_recaptcha','https://www.google.com/recaptcha/api.js?render='.get_option("mo_wpns_recaptcha_site_key_v3"),[],MO2F_VERSION);
159
  wp_enqueue_script('mo2f_recaptcha');
160
  echo'
161
  <div style="font-family:\'Open Sans\',sans-serif;margin:0px auto;width:303px;text-align:center;">
views/feedback_form.php CHANGED
@@ -135,6 +135,12 @@ $plugins = MO2f_Utility::get_all_plugins_installed();
135
  jQuery('#mo2f_link_id').html('<p>Thanks for upgrading. For setup instructions, please follow this guide' +
136
  ', <a href="<?php echo MoWpnsConstants::setupGuide?>" target="_blank"><b>VIDEO GUIDE.</b></a></p>');
137
  jQuery('#mo2f_link_id').show();
 
 
 
 
 
 
138
  } else if (reason == "Exhausted Email or SMS") {
139
  jQuery('#mo_wpns_other_plugins_installed').hide();
140
  jQuery('#wpns_query_feedback').attr("placeholder", "Write your query here.");
135
  jQuery('#mo2f_link_id').html('<p>Thanks for upgrading. For setup instructions, please follow this guide' +
136
  ', <a href="<?php echo MoWpnsConstants::setupGuide?>" target="_blank"><b>VIDEO GUIDE.</b></a></p>');
137
  jQuery('#mo2f_link_id').show();
138
+ }else if(reason == "User Limit") {
139
+ jQuery('#mo_wpns_other_plugins_installed').hide();
140
+ jQuery('#wpns_query_feedback').attr("placeholder", "Write your query here.");
141
+ jQuery('#mo2f_link_id').html('<p>You can download our <a href="https://wordpress.org/plugins/miniorange-login-security/" target="_blank"><b>Multi Factor Authentication</b></a> plugin to setup 2FA for unlimited admin users.</p>');
142
+ jQuery('#mo2f_link_id').show();
143
+
144
  } else if (reason == "Exhausted Email or SMS") {
145
  jQuery('#mo_wpns_other_plugins_installed').hide();
146
  jQuery('#wpns_query_feedback').attr("placeholder", "Write your query here.");
views/trial.php CHANGED
@@ -1,35 +1,61 @@
1
- <br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <div class="mo2f_table_layout mo2f_table_layout1">
3
  <h3> Trial Request Form : <div style="float: right;">
4
  <?php
5
  echo '<a class="mo_wpns_button mo_wpns_button1 mo2f_offer_contact_us_button" href="'.esc_url($two_fa).'">Back</a>';
6
  ?>
7
  </div></h3>
8
- <form method="post">
9
  <input type="hidden" name="option" value="mo2f_trial_request_form" />
10
  <input type="hidden" name="nonce" value="<?php echo esc_html(wp_create_nonce('mo2f_trial-nonce'))?>">
11
  <table cellpadding="4" cellspacing="4">
12
  <tr>
13
  <td><strong>Email ID : </strong></td>
14
- <td><input required type="email" name="mo2f_trial_email" style="width: 300px;" value="<?php echo esc_html(get_option('mo2f_email'));?>" placeholder="Email id" /></td>
15
  </tr>
16
  <tr>
17
  <td><strong>Phone No. : </strong></td>
18
- <td><input required type="tel" name="mo2f_trial_phone" style="width: 300px;" id= "mo2f_phone" value="<?php echo esc_html($user_phone); ?>" /></td>
19
  </tr>
20
  <tr>
21
  <td valign=top ><strong>Request a Trial for : </strong></td>
22
  <td>
23
  <p style = "margin-top:0px">
24
  <input type= 'radio' name= 'mo2f_trial_plan' id="mo2f_sites_for_2fa" onchange="mo2f_display_field(this)" value="All Inclusive" required >All Inclusive (Unlimited Users + Advanced Features)<br>
25
- <div id="mo2f_sites_for_2fa_field" name= 'mo2f_trial_plan_field' style="display: none">&emsp;Number of sites on which you intend to enable 2FA : <input type="number" min="1" name="mo2f_number_of_sites_1" style="width: 20%;" value="1" disabled required/></div>
26
  </p>
27
  <p><input type= 'radio' name= 'mo2f_trial_plan' id="mo2f_users_for_2fa" onchange="mo2f_display_field(this)" value="Enterprise" required >Enterprise(Unlimited sites)<br></p>
28
- <div id="mo2f_users_for_2fa_field" name= 'mo2f_trial_plan_field'style="display: none">&emsp;Number of users who will use 2FA : <input type="number" min="5" name="mo2f_number_of_users_2" style="width: 20%;" value="5" disabled required/></div>
29
 
30
  <p><input type= 'radio' name= 'mo2f_trial_plan' id="mo2f_confused" onchange="mo2f_display_field(this)" value="notSure" required >Need help in choosing the plan?<br>
31
- <div id="mo2f_confused_field" name= 'mo2f_trial_plan_field' style="display: none"><table disabled ><td>&emsp;Number of users who will use 2FA : </td><td><input type="number" min="5" name="mo2f_number_of_users_3" style="width: 40%;" value="5" required/></td>
32
- <td>&emsp;Number of sites on which you intend to enable 2FA : </td><td><input type="number" min="1" name="mo2f_number_of_sites_3" style="width: 40%;" id= "mo2f_number_of_sites" value="1" required/></td></table></div>
33
  </p>
34
  <p>
35
  Authentication method you prefer to use : <select name="mo2f_authentication_method" id="mo2f_authentication_method">
@@ -44,6 +70,27 @@
44
 
45
  </td>
46
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  </table>
48
  <div style="padding-top: 10px;">
49
  <p ><b><i>NOTE: You will receive an email with your trial license key that allows you to use the premium plugin for 7 days. If you choose to purchase the plugin, you can use the license key you receive to convert the trial version into the fully functional version.
@@ -75,6 +122,14 @@
75
  jQuery(':input[type="submit"]').css('color', 'white');
76
  jQuery(':input[type="submit"]').css('box-shadow', 'none');
77
  }
 
 
 
 
 
 
 
 
78
 
79
  });
80
  </script>
1
+ <?php
2
+ // get all plugins list
3
+ $all_plugins = get_plugins();
4
+ $plugins = array();
5
+ $form = "";
6
+ $plugins["Default WP login form"] = "Default WP login form";
7
+ foreach ($all_plugins as $plugin_name=>$plugin_details){
8
+ $plugins[$plugin_name] = $plugin_details["Name"];
9
+ }
10
+ unset($plugins['miniorange-2-factor-authentication/miniorange_2_factor_settings.php']);
11
+
12
+ $my_theme = wp_get_theme();
13
+ if ( $my_theme->exists() )
14
+ $theme_name = $my_theme["Name"];
15
+
16
+ ?>
17
+ <style>
18
+ #mo2f_trial_request_form input[type=text], #mo2f_trial_request_form input[type=email], #mo2f_trial_request_form input[type=tel], #mo2f_trial_login_form
19
+ {
20
+ width: 300px;
21
+ }
22
+
23
+ #mo2f_trial_request_form input[type=number]
24
+ {
25
+ width: 80px;
26
+ }
27
+ </style>
28
  <div class="mo2f_table_layout mo2f_table_layout1">
29
  <h3> Trial Request Form : <div style="float: right;">
30
  <?php
31
  echo '<a class="mo_wpns_button mo_wpns_button1 mo2f_offer_contact_us_button" href="'.esc_url($two_fa).'">Back</a>';
32
  ?>
33
  </div></h3>
34
+ <form method="post" id="mo2f_trial_request_form">
35
  <input type="hidden" name="option" value="mo2f_trial_request_form" />
36
  <input type="hidden" name="nonce" value="<?php echo esc_html(wp_create_nonce('mo2f_trial-nonce'))?>">
37
  <table cellpadding="4" cellspacing="4">
38
  <tr>
39
  <td><strong>Email ID : </strong></td>
40
+ <td><input required type="email" name="mo2f_trial_email" value="<?php echo esc_html(get_option('mo2f_email'));?>" placeholder="Email id" /></td>
41
  </tr>
42
  <tr>
43
  <td><strong>Phone No. : </strong></td>
44
+ <td><input required type="tel" name="mo2f_trial_phone" id= "mo2f_phone" value="<?php echo esc_html($user_phone); ?>" /></td>
45
  </tr>
46
  <tr>
47
  <td valign=top ><strong>Request a Trial for : </strong></td>
48
  <td>
49
  <p style = "margin-top:0px">
50
  <input type= 'radio' name= 'mo2f_trial_plan' id="mo2f_sites_for_2fa" onchange="mo2f_display_field(this)" value="All Inclusive" required >All Inclusive (Unlimited Users + Advanced Features)<br>
51
+ <div id="mo2f_sites_for_2fa_field" name= 'mo2f_trial_plan_field' style="display: none">&emsp;Number of sites on which you intend to enable 2FA : <input type="number" min="1" name="mo2f_number_of_sites_1" value="1" disabled required/></div>
52
  </p>
53
  <p><input type= 'radio' name= 'mo2f_trial_plan' id="mo2f_users_for_2fa" onchange="mo2f_display_field(this)" value="Enterprise" required >Enterprise(Unlimited sites)<br></p>
54
+ <div id="mo2f_users_for_2fa_field" name= 'mo2f_trial_plan_field'style="display: none">&emsp;Number of users who will use 2FA : <input type="number" min="5" name="mo2f_number_of_users_2" value="5" disabled required/></div>
55
 
56
  <p><input type= 'radio' name= 'mo2f_trial_plan' id="mo2f_confused" onchange="mo2f_display_field(this)" value="notSure" required >Need help in choosing the plan?<br>
57
+ <div id="mo2f_confused_field" name= 'mo2f_trial_plan_field' style="display: none"><table disabled ><td>&emsp;Number of users who will use 2FA : </td><td><input type="number" min="5" name="mo2f_number_of_users_3" value="5" required/></td>
58
+ <td>&emsp;Number of sites on which you intend to enable 2FA : </td><td><input type="number" min="1" name="mo2f_number_of_sites_3" id= "mo2f_number_of_sites" value="1" required/></td></table></div>
59
  </p>
60
  <p>
61
  Authentication method you prefer to use : <select name="mo2f_authentication_method" id="mo2f_authentication_method">
70
 
71
  </td>
72
  </tr>
73
+
74
+ <tr>
75
+ <td><strong>Login Form:</strong></td>
76
+ <td>
77
+ <select name="mo2f_trial_login_form" id="mo2f_trial_login_form">
78
+ <?php
79
+ foreach ($plugins as $plugin_name){
80
+ ?>
81
+ <option value="<?php echo esc_html($plugin_name); ?>"><?php echo esc_html($plugin_name); ?></option>
82
+ <?php
83
+ }
84
+ ?>
85
+ <option value="Other">Other Login Form</option>
86
+ </select>
87
+ <input type="text" id="mo2f_other_login_form" name="mo2f_other_login_form" value="" placeholder="Name of the login form" >
88
+ </td>
89
+ </tr>
90
+ <tr>
91
+ <td><strong>Theme:</strong></td>
92
+ <td><input required type="text" name="mo2f_trial_theme" value="<?php echo esc_html($theme_name) ?>" placeholder="Wordpress Theme" required/></td>
93
+ </tr>
94
  </table>
95
  <div style="padding-top: 10px;">
96
  <p ><b><i>NOTE: You will receive an email with your trial license key that allows you to use the premium plugin for 7 days. If you choose to purchase the plugin, you can use the license key you receive to convert the trial version into the fully functional version.
122
  jQuery(':input[type="submit"]').css('color', 'white');
123
  jQuery(':input[type="submit"]').css('box-shadow', 'none');
124
  }
125
+ jQuery('#mo2f_other_login_form').hide();
126
+ jQuery('#mo2f_trial_login_form').click(function(){
127
+ var other_login_form = jQuery('#mo2f_trial_login_form').val();
128
+ if(other_login_form != 'Other')
129
+ jQuery('#mo2f_other_login_form').hide();
130
+ else
131
+ jQuery('#mo2f_other_login_form').show();
132
+ });
133
 
134
  });
135
  </script>
views/twofa/setup_twofa.php CHANGED
@@ -192,13 +192,14 @@
192
  </div>
193
  <div class="test_auth_button">
194
  <?php
195
-
196
- if($mo2f_two_fa_method != '' and (!get_user_meta( $user->ID, 'mo_backup_code_generated', true) and !get_user_meta( $user->ID, 'mo_backup_code_downloaded', true))){
197
  ?>
198
  <button class="mo2f-test-button" id="mo_2f_generate_codes">Download Backup Codes
199
  </button>
200
  <?php
201
  }
 
202
  $customer_registered = get_option('mo_2factor_user_registration_status') == 'MO_2_FACTOR_PLUGIN_SETTINGS';
203
  if($customer_registered && $selectedMethod == 'OTP Over SMS' && current_user_can('administrator')){
204
  ?>
@@ -280,7 +281,7 @@
280
  <h3 class="modal-title mo2f-email-otp">Email Address for OTP</h3><span id="closeEnterEmail" class="modal-span-close">X</span>
281
  </div>
282
  <div class="modal-body" style="height: auto">
283
- <h2><i>Enter your Email:&nbsp;&nbsp;&nbsp; <input type ='email' id='emailEntered' name='emailEntered' size= '40' required value="<?php echo esc_html($email);?>"/></i></h2>
284
  <?php if(current_user_can('administrator')){ ?>
285
  <i class="note">NOTE :- If you haven't configured SMTP, please set your SMTP to get the OTP over email.</i>
286
  <a href='<?php echo $two_factor_premium_doc['Setup SMTP'];?>'target="_blank">
@@ -289,7 +290,7 @@
289
  </div>
290
  <div class="modal-footer">
291
  <input type="text" id="current_method" hidden value="">
292
- <button type="button" class="button button-primary button-large" id="save_entered_email">Save</button>
293
  </div>
294
  </div>
295
  </div>
@@ -329,10 +330,32 @@
329
  </div>
330
 
331
  <script>
 
 
 
 
 
 
 
 
332
  jQuery('#closeConfirmCloud1').click(function(){
333
  jQuery('#mo2f_cloud').css('display', 'none');
334
 
335
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
  jQuery('#ConfirmCloudButton1').click(function(){
337
  document.getElementById('mo2f_cloud').checked = false;
338
  document.getElementById('mo2f_cloud_modal').style.display = "none";
@@ -402,33 +425,53 @@
402
  jQuery('#mo2f_save_free_plan_auth_methods_form').submit();
403
  }
404
  else if(response == "NonceDidNotMatch")
405
- {
 
 
 
406
  error_msg("An unknown error has occured.");
407
  }else if(response=="USER_LIMIT_EXCEEDED"){
408
- jQuery('#EnterEmail').css('display', 'none');
 
 
 
409
  error_msg(" Your limit of 3 users has exceeded. Please upgrade to premium plans to setup 2FA for more users");
410
  }
411
  else if (response == "smtpnotset"){
412
- jQuery('#EnterEmail').css('display', 'none');
 
 
 
413
  error_msg(" Please set up SMTP for your website to receive emails and prevent the accidental lock out");
414
 
415
 
416
  }
417
  else
418
  {
419
- jQuery('#EnterEmail').css('display', 'none');
420
  error_msg(" Invalid Email.");
 
 
 
421
 
422
  }
423
  close_modal();
424
  });
425
  }
 
 
 
 
 
 
 
426
 
427
  });
428
 
429
  jQuery('#mo_2f_generate_codes').click(function(){
430
- jQuery("#mo2f_2factor_generate_backup_codes").submit();
431
- jQuery("#mo2f_free_plan_auth_methods").slideToggle(1000);
 
432
  });
433
  function show_3_minorange_methods(){
434
  authMethod = jQuery("#mo2fa_MO_methods").val();
192
  </div>
193
  <div class="test_auth_button">
194
  <?php
195
+ $user_id = get_current_user_id();
196
+ if($mo2f_two_fa_method != '' && !get_user_meta($user_id,'mo_backup_code_limit_reached')){
197
  ?>
198
  <button class="mo2f-test-button" id="mo_2f_generate_codes">Download Backup Codes
199
  </button>
200
  <?php
201
  }
202
+
203
  $customer_registered = get_option('mo_2factor_user_registration_status') == 'MO_2_FACTOR_PLUGIN_SETTINGS';
204
  if($customer_registered && $selectedMethod == 'OTP Over SMS' && current_user_can('administrator')){
205
  ?>
281
  <h3 class="modal-title mo2f-email-otp">Email Address for OTP</h3><span id="closeEnterEmail" class="modal-span-close">X</span>
282
  </div>
283
  <div class="modal-body" style="height: auto">
284
+ <h2><i>Enter your Email:&nbsp;&nbsp;&nbsp; <input type ='text' id='emailEntered' pattern="[^@\s]+@[^@\s]+\.[^@\s]+" name='emailEntered' size= '40' required value="<?php echo esc_html($email);?>"/></i></h2>
285
  <?php if(current_user_can('administrator')){ ?>
286
  <i class="note">NOTE :- If you haven't configured SMTP, please set your SMTP to get the OTP over email.</i>
287
  <a href='<?php echo $two_factor_premium_doc['Setup SMTP'];?>'target="_blank">
290
  </div>
291
  <div class="modal-footer">
292
  <input type="text" id="current_method" hidden value="">
293
+ <button type="button" class="button button-primary button-large" id="save_entered_email" >Send OTP</button>
294
  </div>
295
  </div>
296
  </div>
330
  </div>
331
 
332
  <script>
333
+
334
+ const btn = document.getElementById('save_entered_email');
335
+
336
+
337
+ btn.addEventListener('click', function handleClick() {
338
+ btn.textContent = 'Sending OTP';
339
+ jQuery("#save_entered_email").attr("disabled", true);
340
+ });
341
  jQuery('#closeConfirmCloud1').click(function(){
342
  jQuery('#mo2f_cloud').css('display', 'none');
343
 
344
  });
345
+ jQuery('#OTPOverEmail_configuration').click(function(){
346
+ jQuery(document).ready(function(){
347
+ var input = jQuery("#emailEntered");
348
+ var len = input.val().length;
349
+
350
+ input[0].focus();
351
+ input[0].setSelectionRange(len, len);
352
+
353
+
354
+
355
+
356
+ });
357
+ });
358
+
359
  jQuery('#ConfirmCloudButton1').click(function(){
360
  document.getElementById('mo2f_cloud').checked = false;
361
  document.getElementById('mo2f_cloud_modal').style.display = "none";
425
  jQuery('#mo2f_save_free_plan_auth_methods_form').submit();
426
  }
427
  else if(response == "NonceDidNotMatch")
428
+ {
429
+ jQuery("#save_entered_email").attr("disabled",false);
430
+ const btn = document.getElementById('save_entered_email');
431
+ btn.textContent = 'Send OTP';
432
  error_msg("An unknown error has occured.");
433
  }else if(response=="USER_LIMIT_EXCEEDED"){
434
+
435
+ jQuery("#save_entered_email").attr("disabled",false);
436
+ const btn = document.getElementById('save_entered_email');
437
+ btn.textContent = 'Send OTP';
438
  error_msg(" Your limit of 3 users has exceeded. Please upgrade to premium plans to setup 2FA for more users");
439
  }
440
  else if (response == "smtpnotset"){
441
+
442
+ jQuery("#save_entered_email").attr("disabled",false);
443
+ const btn = document.getElementById('save_entered_email');
444
+ btn.textContent = 'Send OTP';
445
  error_msg(" Please set up SMTP for your website to receive emails and prevent the accidental lock out");
446
 
447
 
448
  }
449
  else
450
  {
451
+
452
  error_msg(" Invalid Email.");
453
+ jQuery("#save_entered_email").attr("disabled",false);
454
+ const btn = document.getElementById('save_entered_email');
455
+ btn.textContent = 'Send OTP';
456
 
457
  }
458
  close_modal();
459
  });
460
  }
461
+ else
462
+ {
463
+ error_msg("Please enter your email");
464
+ jQuery("#save_entered_email").attr("disabled",false);
465
+ const btn = document.getElementById('save_entered_email');
466
+ btn.textContent = 'Send OTP';
467
+ }
468
 
469
  });
470
 
471
  jQuery('#mo_2f_generate_codes').click(function(){
472
+ jQuery("#mo2f_2factor_generate_backup_codes").submit();
473
+ jQuery("#mo2f_free_plan_auth_methods").slideToggle(1000);
474
+
475
  });
476
  function show_3_minorange_methods(){
477
  authMethod = jQuery("#mo2fa_MO_methods").val();
views/twofa/two_fa_custom_form.php CHANGED
@@ -386,6 +386,7 @@
386
  $mo('#mo2f_shortcode_submit_selector').prop('disabled',false);
387
 
388
  $mo('#selector_div').css('display','inherit')
 
389
 
390
  }
391
 
386
  $mo('#mo2f_shortcode_submit_selector').prop('disabled',false);
387
 
388
  $mo('#selector_div').css('display','inherit')
389
+ jQuery("#mo2f_shortcode_form_selector").focus();
390
 
391
  }
392
 
views/twofa/two_fa_unlimittedUser.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  $setup_dirName = dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'twofa'.DIRECTORY_SEPARATOR.'link_tracer.php';
3
- $settings_tab_tooltip_array = array ('Disable this to temporarily disable 2FA prompt for all users','If you disable this checkbox, A separate screen would be presented to users for 2FA','If you disable this checkbox, user enrollment (forcing users to setup 2FA after initial login) will not be done','Selecting the below roles will enable 2-Factor for all users associated with that role.','Plugin debug log file is very helpful to debug the issue in case you face.', 'If you enable this checkbox then you will have a choice to login using any of the methods that is already configured','Users can either have a grace period to configure 2FA (users who don\'t have 2fa setup after grace period will be locked out), or users can setup 2FA anytime they want.');
4
 
5
  include $setup_dirName;
6
  function miniorange_2_factor_user_roles($current_user) {
@@ -165,7 +165,7 @@ if(current_user_can('administrator')){
165
  </form>
166
  </div>
167
  </br><hr>
168
- <h2>How long should the grace period for your users be?
169
  <?php mo2f_setting_tooltip_array($settings_tab_tooltip_array[6]); ?>
170
  </h2>
171
  <div>
@@ -174,10 +174,10 @@ if(current_user_can('administrator')){
174
 
175
  <input type="hidden" id="mo2f_nonce_enable_grace_period" name="mo2f_nonce_enable_grace_period" value="<?php echo esc_html(wp_create_nonce( "mo2f-nonce-enable-grace-period" )) ?>"/>
176
  <input type="radio" name="mo2f_grace_period" id="mo2f_no_grace_period" value="off" <?php checked( MoWpnsUtility::get_mo2f_db_option('mo2f_grace_period','site_option')=="off"); ?>/>
177
- <span> Users can configure 2FA anytime they want. </span><br><br>
178
 
179
  <input type="radio" name="mo2f_grace_period" id="mo2f_use_grace_period" value="on" <?php checked( MoWpnsUtility::get_mo2f_db_option('mo2f_grace_period','site_option')=="on"); ?>/>
180
- <span> Give users a grace period to configure 2FA (Users have to configure 2FA within given time to avoid lockout).&nbsp;&nbsp;&nbsp; </span>
181
 
182
 
183
  </br>
@@ -216,6 +216,9 @@ jQuery(document).ready(function($){
216
  if(jQuery(this).is(':checked'))
217
  {
218
  jQuery("#mo2f_grace_period_show").show();
 
 
 
219
  }
220
  });
221
  jQuery("#mo2f_no_grace_period").click(function()
@@ -225,7 +228,12 @@ jQuery(document).ready(function($){
225
  jQuery("#mo2f_grace_period_show").hide();
226
  }
227
  });
228
-
 
 
 
 
 
229
 
230
  });
231
  });
1
  <?php
2
  $setup_dirName = dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'twofa'.DIRECTORY_SEPARATOR.'link_tracer.php';
3
+ $settings_tab_tooltip_array = array ('Disable this to temporarily disable 2FA prompt for all users','If you disable this checkbox, A separate screen would be presented to users for 2FA','If you disable this checkbox, user enrollment (forcing users to setup 2FA after initial login) will not be done','Selecting the below roles will enable 2-Factor for all users associated with that role.','Plugin debug log file is very helpful to debug the issue in case you face.', 'If you enable this checkbox then you will have a choice to login using any of the methods that is already configured','Users can either have a grace period to configure 2FA (users who don\'t have 2fa setup after grace period, will be enforced to setup 2FA)');
4
 
5
  include $setup_dirName;
6
  function miniorange_2_factor_user_roles($current_user) {
165
  </form>
166
  </div>
167
  </br><hr>
168
+ <h2>Should users be given a grace period or should they be directly enforced for 2FA setup?
169
  <?php mo2f_setting_tooltip_array($settings_tab_tooltip_array[6]); ?>
170
  </h2>
171
  <div>
174
 
175
  <input type="hidden" id="mo2f_nonce_enable_grace_period" name="mo2f_nonce_enable_grace_period" value="<?php echo esc_html(wp_create_nonce( "mo2f-nonce-enable-grace-period" )) ?>"/>
176
  <input type="radio" name="mo2f_grace_period" id="mo2f_no_grace_period" value="off" <?php checked( MoWpnsUtility::get_mo2f_db_option('mo2f_grace_period','site_option')=="off"); ?>/>
177
+ <span> Users should be directly enforced for 2FA setup </span><br><br>
178
 
179
  <input type="radio" name="mo2f_grace_period" id="mo2f_use_grace_period" value="on" <?php checked( MoWpnsUtility::get_mo2f_db_option('mo2f_grace_period','site_option')=="on"); ?>/>
180
+ <span> Give users a grace period to configure 2FA (Users will be enforced to setup 2FA after grace period expiry).&nbsp;&nbsp;&nbsp; </span>
181
 
182
 
183
  </br>
216
  if(jQuery(this).is(':checked'))
217
  {
218
  jQuery("#mo2f_grace_period_show").show();
219
+
220
+
221
+ jQuery("#mo2f_grace_period").focus();
222
  }
223
  });
224
  jQuery("#mo2f_no_grace_period").click(function()
228
  jQuery("#mo2f_grace_period_show").hide();
229
  }
230
  });
231
+ jQuery("#mo2f_grace_hour").click(function(){
232
+ jQuery("#mo2f_grace_period").focus();
233
+ });
234
+ jQuery("#mo2f_grace_day").click(function(){
235
+ jQuery("#mo2f_grace_period").focus();
236
+ });
237
 
238
  });
239
  });
views/upgrade.php CHANGED
@@ -46,8 +46,8 @@ echo '
46
  <br><br>
47
 
48
  <?php
49
- wp_register_style('mo2f_upgrade_css',$mainDir.'/includes/css/upgrade.css' );
50
- wp_register_style('mo2f_font_awesome',"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css");
51
  wp_enqueue_style('mo2f_upgrade_css' );
52
  wp_enqueue_style('mo2f_font_awesome' );
53
  ?>
@@ -118,7 +118,7 @@ echo '
118
 
119
  Google Authenticator <br>
120
  Authy Authenticator <br>
121
- Microsoft Authenticato <br>
122
  LastPass Authenticator<br>
123
  FreeOTP Authenticator<br>
124
  Duo Mobile Authenticator <br>
@@ -265,7 +265,7 @@ echo '
265
 
266
  Google Authenticator <br>
267
  Authy Authenticator <br>
268
- Microsoft Authenticato <br>
269
  LastPass Authenticator<br>
270
  FreeOTP Authenticator<br>
271
  Duo Mobile Authenticator <br>
46
  <br><br>
47
 
48
  <?php
49
+ wp_register_style('mo2f_upgrade_css',$mainDir.'/includes/css/upgrade.css',[],MO2F_VERSION );
50
+ wp_register_style('mo2f_font_awesome','https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css',[],MO2F_VERSION);
51
  wp_enqueue_style('mo2f_upgrade_css' );
52
  wp_enqueue_style('mo2f_font_awesome' );
53
  ?>
118
 
119
  Google Authenticator <br>
120
  Authy Authenticator <br>
121
+ Microsoft Authenticator <br>
122
  LastPass Authenticator<br>
123
  FreeOTP Authenticator<br>
124
  Duo Mobile Authenticator <br>
265
 
266
  Google Authenticator <br>
267
  Authy Authenticator <br>
268
+ Microsoft Authenticator <br>
269
  LastPass Authenticator<br>
270
  FreeOTP Authenticator<br>
271
  Duo Mobile Authenticator <br>