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

Version Description

  • Google Authenticator - Two factor Authentication (2FA, OTP) :
  • Bug Fixes and Code Improvements
Download this release

Release Info

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

Code changes from version 5.5.6 to 5.5.7

Files changed (66) hide show
  1. api/Mo2f_OnPremRedirect.php +5 -4
  2. api/class-customer-common-setup.php +34 -45
  3. api/mo2f_api.php +1 -3
  4. controllers/account.php +1 -1
  5. controllers/advanced-blocking.php +1 -1
  6. controllers/backup/backup_ajax.php +1 -1
  7. controllers/change-password.php +4 -1
  8. controllers/content-protection.php +1 -1
  9. controllers/duo_authenticator/duo_authenticator_ajax.php +5 -9
  10. controllers/feedback_footer.php +3 -3
  11. controllers/ip-blocking.php +15 -29
  12. controllers/malware_scanner/malware_scan_ajax.php +1 -1
  13. controllers/notification-settings.php +5 -8
  14. controllers/registration-security.php +1 -1
  15. controllers/request_christmas_offer.php +1 -1
  16. controllers/request_demo.php +1 -1
  17. controllers/request_offer.php +1 -1
  18. controllers/support.php +4 -3
  19. controllers/tour/tour_ajax.php +2 -2
  20. controllers/trial.php +0 -2
  21. controllers/twofa/mo2fa_common_login.php +41 -19
  22. controllers/twofa/mo2fa_inline_registration.php +26 -12
  23. controllers/twofa/setup_twofa.php +1 -1
  24. controllers/twofa/two_fa_unlimittedUser_ajax.php +5 -5
  25. controllers/twofa/two_factor_ajax.php +4 -4
  26. controllers/wpns-loginsecurity-ajax.php +25 -18
  27. handler/WAF/mo-waf-real-time.php +9 -13
  28. handler/ajax.php +6 -1
  29. handler/feedback_form.php +2 -2
  30. handler/login.php +3 -3
  31. handler/malware_scanner.php +19 -16
  32. handler/malware_scanner/malware_scanner_cron.php +20 -17
  33. handler/mo-waf.php +8 -5
  34. handler/recaptcha.php +13 -9
  35. handler/spam.php +2 -1
  36. handler/twofa/{two_fa_short_custom.php → class-twofacustomregformshortcode.php} +6 -17
  37. handler/twofa/setup_twofa.php +3 -2
  38. handler/twofa/two_fa_duo_handler.php +26 -20
  39. handler/twofa/two_fa_login.php +6 -6
  40. handler/twofa/two_fa_pass2login.php +25 -35
  41. handler/twofa/two_fa_settings.php +63 -75
  42. handler/twofa/two_fa_utility.php +4 -2
  43. handler/user-profile-2fa-update.php +11 -11
  44. helper/constants.php +0 -1
  45. helper/curl.php +27 -36
  46. helper/dashboard_security_notification.php +12 -12
  47. helper/pluginUtility.php +5 -1
  48. includes/css/style_settings.css +20 -0
  49. includes/css/upgrade.css +920 -916
  50. includes/email-New-release.php +4 -1
  51. includes/images/40290_shield.png +0 -0
  52. includes/images/xecurify-logo.png +0 -0
  53. miniorange_2_factor_settings.php +53 -8
  54. readme.txt +33 -24
  55. views/account/register.php +1 -3
  56. views/advanced-blocking.php +1 -1
  57. views/backup/backup_setting_view.php +1 -1
  58. views/change-password.php +5 -5
  59. views/common-elements.php +32 -26
  60. views/email-IPaddress.php +17 -9
  61. views/ip-blocking.php +3 -3
  62. views/malware_scanner/scan_report_view.php +10 -10
  63. views/support.php +0 -1
  64. views/twofa/setup/setup_duo_authenticator.php +1 -1
  65. views/twofa/two_fa_setup_notification.php +3 -1
  66. views/upgrade.php +22 -27
api/Mo2f_OnPremRedirect.php CHANGED
@@ -30,7 +30,7 @@ class Mo2f_OnPremRedirect {
30
  else{
31
  $user_id = MO2f_Utility::mo2f_get_transient( $session_id_encrypt, 'mo2f_current_user_id' );
32
  }
33
- $redirect_to = isset( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : null;
34
  $kba_ans_1 = sanitize_text_field( $_POST['mo2f_answer_1'] );
35
  $kba_ans_2 = sanitize_text_field( $_POST['mo2f_answer_2'] );
36
  $questions_challenged = get_user_meta($user_id ,'kba_questions_user');
@@ -113,7 +113,7 @@ class Mo2f_OnPremRedirect {
113
  function OnpremSendOTPEMail($current_user,$tokenName,$timeName,$email=null)
114
  {
115
  $count_threshold = 5;
116
- global $Mo2fdbQueries;
117
  if(!isset($current_user) or is_null($current_user))
118
  {
119
  if(is_user_logged_in()){
@@ -154,7 +154,7 @@ class Mo2f_OnPremRedirect {
154
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
155
  <tbody>
156
  <tr>
157
- <td><img src="https://ci5.googleusercontent.com/proxy/10EQeM1udyBOkfD2dwxGhIaMXV4lOwCRtUecpsDkZISL0JIkOL2JhaYhVp54q6Sk656rW2rpAFJFEgGQiAOVcYIIKxXYMHHMNSNB=s0-d-e1-ft#https://login.xecurify.com/moas/images/xecurify-logo.png" style="color:#5fb336;text-decoration:none;display:block;width:auto;height:auto;max-height:35px" class="CToWUd"></td>
158
  </tr>
159
  </tbody>
160
  </table>
@@ -310,6 +310,7 @@ class Mo2f_OnPremRedirect {
310
  }
311
 
312
  function getEmailTemplate($userID, $otpTokenH,$otpTokenDH,$txid,$email){
 
313
  $url = get_site_option('siteurl').'/wp-login.php?';
314
  $message = '<table cellpadding="25" style="margin:0px auto">
315
  <tbody>
@@ -318,7 +319,7 @@ class Mo2f_OnPremRedirect {
318
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
319
  <tbody>
320
  <tr>
321
- <td><img src="https://ci5.googleusercontent.com/proxy/10EQeM1udyBOkfD2dwxGhIaMXV4lOwCRtUecpsDkZISL0JIkOL2JhaYhVp54q6Sk656rW2rpAFJFEgGQiAOVcYIIKxXYMHHMNSNB=s0-d-e1-ft#https://login.xecurify.com/moas/images/xecurify-logo.png" style="color:#5fb336;text-decoration:none;display:block;width:auto;height:auto;max-height:35px" class="CToWUd"></td>
322
  </tr>
323
  </tbody>
324
  </table>
30
  else{
31
  $user_id = MO2f_Utility::mo2f_get_transient( $session_id_encrypt, 'mo2f_current_user_id' );
32
  }
33
+ $redirect_to = isset( $_POST['redirect_to'] ) ? sanitize_url( $_POST['redirect_to']) : null;
34
  $kba_ans_1 = sanitize_text_field( $_POST['mo2f_answer_1'] );
35
  $kba_ans_2 = sanitize_text_field( $_POST['mo2f_answer_2'] );
36
  $questions_challenged = get_user_meta($user_id ,'kba_questions_user');
113
  function OnpremSendOTPEMail($current_user,$tokenName,$timeName,$email=null)
114
  {
115
  $count_threshold = 5;
116
+ global $Mo2fdbQueries,$imagePath;
117
  if(!isset($current_user) or is_null($current_user))
118
  {
119
  if(is_user_logged_in()){
154
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
155
  <tbody>
156
  <tr>
157
+ <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>
158
  </tr>
159
  </tbody>
160
  </table>
310
  }
311
 
312
  function getEmailTemplate($userID, $otpTokenH,$otpTokenDH,$txid,$email){
313
+ global $imagePath;
314
  $url = get_site_option('siteurl').'/wp-login.php?';
315
  $message = '<table cellpadding="25" style="margin:0px auto">
316
  <tbody>
319
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
320
  <tbody>
321
  <tr>
322
+ <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>
323
  </tr>
324
  </tbody>
325
  </table>
api/class-customer-common-setup.php CHANGED
@@ -316,28 +316,22 @@ class Customer_Cloud_Setup {
316
 
317
  $headers = array('header' => "Authorization:Basic" . base64_encode("$mo2f_user_email:$site_url") );
318
 
319
- $postdata = array('mo2f_email'=> $mo2f_user_email,
320
- 'mo2f_domain' =>$site_url,
321
- 'headers'=>$headers['header'],
322
- 'mo2f_generate_backup_codes'=>'initiated_backup_codes');
323
-
324
- $handle = curl_init();
325
-
326
- curl_setopt_array($handle,
327
- array(
328
- CURLOPT_URL => $url,
329
- CURLOPT_POST => true,
330
- CURLOPT_POSTFIELDS => $postdata,
331
- CURLOPT_RETURNTRANSFER => true,
332
- CURLOPT_SSL_VERIFYHOST => FALSE,
333
- CURLOPT_SSL_VERIFYPEER => FALSE,
334
- )
335
- );
336
-
337
- $data = curl_exec($handle);
338
-
339
- curl_close($handle);
340
- return $data;
341
 
342
  }
343
 
@@ -347,29 +341,24 @@ class Customer_Cloud_Setup {
347
  $site_url = site_url();
348
  $headers = array('header' => "Authorization:Basic" . base64_encode("$mo2f_user_email:$site_url") );
349
 
350
- $postdata = array('mo2f_otp_token' => $mo2f_backup_code,
351
- 'mo2f_user_email'=> $mo2f_user_email,
352
- 'headers'=>$headers['header'],
353
- 'mo2f_site_url' => $site_url);
354
-
355
- $handle = curl_init();
356
-
357
- curl_setopt_array($handle,
358
- array(
359
- CURLOPT_URL => $url,
360
- CURLOPT_POST => true,
361
- CURLOPT_POSTFIELDS => $postdata,
362
- CURLOPT_RETURNTRANSFER => true,
363
- CURLOPT_SSL_VERIFYHOST => FALSE,
364
- CURLOPT_SSL_VERIFYPEER => FALSE,
365
- )
366
- );
367
-
368
- $data = curl_exec($handle);
369
-
370
- curl_close($handle);
371
-
372
- return $data;
373
  }
374
 
375
 
316
 
317
  $headers = array('header' => "Authorization:Basic" . base64_encode("$mo2f_user_email:$site_url") );
318
 
319
+ $postdata = array('mo2f_email'=> $mo2f_user_email,
320
+ 'mo2f_domain' =>$site_url,
321
+ 'headers'=>$headers['header'],
322
+ 'mo2f_generate_backup_codes'=>'initiated_backup_codes');
323
+ $args = array(
324
+ 'method' => 'POST',
325
+ 'timeout' => 45,
326
+ 'sslverify' => false,
327
+ 'headers' => array(),
328
+ 'body' => $postdata,
329
+ );
330
+
331
+ $mo2f_api=new Mo2f_Api();
332
+ $data=$mo2f_api->mo2f_wp_remote_post($url,$postdata);
333
+
334
+ return $data;
 
 
 
 
 
 
335
 
336
  }
337
 
341
  $site_url = site_url();
342
  $headers = array('header' => "Authorization:Basic" . base64_encode("$mo2f_user_email:$site_url") );
343
 
344
+ $postdata = array('mo2f_otp_token' => $mo2f_backup_code,
345
+ 'mo2f_user_email'=> $mo2f_user_email,
346
+ 'headers'=>$headers['header'],
347
+ 'mo2f_site_url' => $site_url);
348
+
349
+ $args = array(
350
+ 'method' => 'POST',
351
+ 'timeout' => 45,
352
+ 'sslverify' => false,
353
+ 'headers' => array(),
354
+ 'body' => $postdata,
355
+ );
356
+
357
+ $data=wp_remote_post($url,$args);
358
+
359
+ $data=wp_remote_retrieve_body( $data );
360
+
361
+ return $data;
 
 
 
 
 
362
  }
363
 
364
 
api/mo2f_api.php CHANGED
@@ -38,9 +38,7 @@ class Mo2f_Api
38
  'blocking' => true,
39
  'headers' => $http_header_array
40
  );
41
-
42
- // 'sslverify' => true,//MO_TEST_MODE ? false: true
43
- //wp_remote_retrieve_body
44
 
45
  $response = Mo2f_Api::mo2f_wp_remote_post($url, $args);
46
  return $response;
38
  'blocking' => true,
39
  'headers' => $http_header_array
40
  );
41
+
 
 
42
 
43
  $response = Mo2f_Api::mo2f_wp_remote_post($url, $args);
44
  return $response;
controllers/account.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  if(isset($_POST['option']))
6
  {
7
- $option = trim($_POST['option']);
8
  switch($option)
9
  {
10
  case "mo_wpns_register_customer":
4
 
5
  if(isset($_POST['option']))
6
  {
7
+ $option = trim(sanitize_text_field($_POST['option']));
8
  switch($option)
9
  {
10
  case "mo_wpns_register_customer":
controllers/advanced-blocking.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
6
  {
7
- switch($_POST['option'])
8
  {
9
  case "mo_wpns_block_ip_range":
10
  wpns_handle_range_blocking($_POST); break;
4
 
5
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
6
  {
7
+ switch(sanitize_text_field($_POST['option']))
8
  {
9
  case "mo_wpns_block_ip_range":
10
  wpns_handle_range_blocking($_POST); break;
controllers/backup/backup_ajax.php CHANGED
@@ -11,7 +11,7 @@ public function mo_wpns_file_db_backup_functions(){
11
 
12
  public function mo_wpns_backup_redirect(){
13
 
14
- switch($_POST['call_type'])
15
  {
16
  case "submit_backup_settings_form":
17
  $this->mo_wpns_save_backup_config_form($_POST);
11
 
12
  public function mo_wpns_backup_redirect(){
13
 
14
+ switch(sanitize_text_field(wp_unslash($_POST['call_type'])))
15
  {
16
  case "submit_backup_settings_form":
17
  $this->mo_wpns_save_backup_config_form($_POST);
controllers/change-password.php CHANGED
@@ -5,8 +5,11 @@
5
  $username = $user->data->user_login;
6
  $message = isset($newpassword) && ($newpassword != $confirmpassword) ? "Both Passwords do not match." : "Please enter a stronger password.";
7
  $css_file = plugins_url('wp-security-pro/includes/css/style_settings.css',$mo2f_dirName);
 
8
  $js_file = plugins_url('wp-security-pro/includes/js/settings_page.js',$mo2f_dirName);
9
- $js_url = 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js';
 
 
10
 
11
  include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'change-password.php';
12
  exit;
5
  $username = $user->data->user_login;
6
  $message = isset($newpassword) && ($newpassword != $confirmpassword) ? "Both Passwords do not match." : "Please enter a stronger password.";
7
  $css_file = plugins_url('wp-security-pro/includes/css/style_settings.css',$mo2f_dirName);
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;
controllers/content-protection.php CHANGED
@@ -3,7 +3,7 @@ global $moWpnsUtility,$mo2f_dirName;
3
 
4
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
5
  {
6
- switch($_POST['option'])
7
  {
8
  case "mo_wpns_content_protection":
9
  wpns_handle_content_protection($_POST); break;
3
 
4
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
5
  {
6
+ switch(sanitize_text_field($_POST['option']))
7
  {
8
  case "mo_wpns_content_protection":
9
  wpns_handle_content_protection($_POST); break;
controllers/duo_authenticator/duo_authenticator_ajax.php CHANGED
@@ -13,7 +13,7 @@ class Mo_2f_duo_authenticator
13
 
14
  public function mo2f_duo_ajax_request(){
15
 
16
- switch ($_POST['call_type']) {
17
  case "check_duo_push_auth_status":
18
  $this->mo2f_check_duo_push_auth_status();
19
  break;
@@ -21,10 +21,9 @@ class Mo_2f_duo_authenticator
21
  }
22
 
23
  public function mo2f_duo_authenticator_ajax(){
24
- switch($_POST['call_type'])
25
  {
26
-
27
- case "check_duo_push_auth_status":
28
  $this->mo2f_check_duo_push_auth_status();
29
  break;
30
  }
@@ -44,21 +43,18 @@ class Mo_2f_duo_authenticator
44
  $host = get_site_option('mo2f_d_api_hostname');
45
  $current_user = wp_get_current_user();
46
 
47
- $session_id_encrypt = isset($_POST['session_id_encrypt']) ? $_POST['session_id_encrypt'] : '';
48
  $user_id = MO2f_Utility::mo2f_get_transient( $session_id_encrypt, 'mo2f_current_user_id' );
49
  $user_email = get_user_meta($user_id,'current_user_email');
50
  $user_email = isset($user_email[0])? $user_email[0]:'';
51
 
52
  if($user_email == '' || empty($user_email))
53
- $user_email = $current_user->user_email;
54
 
55
  $device['device'] = 'auto';
56
-
57
  $auth_response = mo2f_duo_auth( $user_email,'push',$device , $skey, $ikey, $host,true);
58
 
59
-
60
  if(isset($auth_response['response']['response']['result']) && $auth_response['response']['response']['result'] == 'allow'){
61
-
62
  wp_send_json('SUCCESS');
63
  }else{
64
 
13
 
14
  public function mo2f_duo_ajax_request(){
15
 
16
+ switch (sanitize_text_field(wp_unslash($_POST['call_type']))) {
17
  case "check_duo_push_auth_status":
18
  $this->mo2f_check_duo_push_auth_status();
19
  break;
21
  }
22
 
23
  public function mo2f_duo_authenticator_ajax(){
24
+ switch (sanitize_text_field(wp_unslash($_POST['call_type'])))
25
  {
26
+ case "check_duo_push_auth_status":
 
27
  $this->mo2f_check_duo_push_auth_status();
28
  break;
29
  }
43
  $host = get_site_option('mo2f_d_api_hostname');
44
  $current_user = wp_get_current_user();
45
 
46
+ $session_id_encrypt = isset($_POST['session_id_encrypt']) ? sanitize_text_field($_POST['session_id_encrypt']) : '';
47
  $user_id = MO2f_Utility::mo2f_get_transient( $session_id_encrypt, 'mo2f_current_user_id' );
48
  $user_email = get_user_meta($user_id,'current_user_email');
49
  $user_email = isset($user_email[0])? $user_email[0]:'';
50
 
51
  if($user_email == '' || empty($user_email))
52
+ $user_email = sanitize_email($current_user->user_email);
53
 
54
  $device['device'] = 'auto';
 
55
  $auth_response = mo2f_duo_auth( $user_email,'push',$device , $skey, $ikey, $host,true);
56
 
 
57
  if(isset($auth_response['response']['response']['result']) && $auth_response['response']['response']['result'] == 'allow'){
 
58
  wp_send_json('SUCCESS');
59
  }else{
60
 
controllers/feedback_footer.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
6
  {
7
- switch($_POST['option'])
8
  {
9
  case "mo_wpns_send_query":
10
  wpns_handle_support_form_new($_POST['query_email'],$_POST['query'],$_POST['query_phone']);
@@ -26,7 +26,7 @@
26
 
27
  function wpns_handle_support_form_new($email,$query,$phone)
28
  {
29
- $send_configuration = (isset($_POST['mo2f_send_configuration'])?$_POST['mo2f_send_configuration']:0);
30
 
31
  if(empty($email) || empty($query)){
32
  do_action('wpns_show_message',MoWpnsMessages::showMessage('SUPPORT_FORM_VALUES'),'ERROR');
@@ -34,7 +34,7 @@
34
  }
35
 
36
  $query = sanitize_text_field( $query );
37
- $email = sanitize_text_field( $email );
38
  $phone = sanitize_text_field( $phone );
39
  $contact_us = new MocURL();
40
 
4
 
5
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
6
  {
7
+ switch(sanitize_text_field($_POST['option']))
8
  {
9
  case "mo_wpns_send_query":
10
  wpns_handle_support_form_new($_POST['query_email'],$_POST['query'],$_POST['query_phone']);
26
 
27
  function wpns_handle_support_form_new($email,$query,$phone)
28
  {
29
+ $send_configuration = (isset($_POST['mo2f_send_configuration'])? sanitize_text_field($_POST['mo2f_send_configuration']):0);
30
 
31
  if(empty($email) || empty($query)){
32
  do_action('wpns_show_message',MoWpnsMessages::showMessage('SUPPORT_FORM_VALUES'),'ERROR');
34
  }
35
 
36
  $query = sanitize_text_field( $query );
37
+ $email = sanitize_email( $email );
38
  $phone = sanitize_text_field( $phone );
39
  $contact_us = new MocURL();
40
 
controllers/ip-blocking.php CHANGED
@@ -5,8 +5,9 @@
5
 
6
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
7
  {
8
- switch($_POST['option'])
9
- {
 
10
  case "mo_wpns_manual_block_ip":
11
  wpns_handle_manual_block_ip($_POST['IP']); break;
12
  case "mo_wpns_unblock_ip":
@@ -28,17 +29,11 @@
28
  $license_url = add_query_arg( array('page' => 'mo_2fa_upgrade'), $_SERVER['REQUEST_URI'] );
29
 
30
 
31
- /** IP BLOCKING RELATED FUNCTIONS **/
32
-
33
- // Function to handle Manual Block IP form submit
34
  function wpns_handle_manual_block_ip($ip)
35
  {
36
-
37
  global $moWpnsUtility;
38
-
39
  if( $moWpnsUtility->check_empty_or_null( $ip) )
40
  {
41
- //Improper message
42
  echo("empty IP");
43
  exit;
44
  }
@@ -49,18 +44,18 @@
49
  }
50
  else
51
  {
52
- $ipAddress = sanitize_text_field( $ip );
 
 
53
  $mo_wpns_config = new MoWpnsHandler();
54
  $isWhitelisted = $mo_wpns_config->is_whitelisted($ipAddress);
55
  if(!$isWhitelisted)
56
  {
57
  if($mo_wpns_config->mo_wpns_is_ip_blocked($ipAddress)){
58
- //Change message
59
  echo("already blocked");
60
  exit;
61
  } else{
62
  $mo_wpns_config->mo_wpns_block_ip($ipAddress, MoWpnsConstants::BLOCKED_BY_ADMIN, true);
63
- //not in structures
64
  ?>
65
  <table id="blockedips_table1" class="display">
66
  <thead><tr><th>IP Address&emsp;&emsp;</th><th>Reason&emsp;&emsp;</th><th>Blocked Until&emsp;&emsp;</th><th>Blocked Date&emsp;&emsp;</th><th>Action&emsp;&emsp;</th></tr></thead>
@@ -72,12 +67,12 @@
72
  global $mo2f_dirName;
73
  foreach($blockedips as $blockedip)
74
  {
75
- echo "<tr class='mo_wpns_not_bold'><td>".$blockedip->ip_address."</td><td>".$blockedip->reason."</td><td>";
76
  if(empty($blockedip->blocked_for_time))
77
  echo "<span class=redtext>Permanently</span>";
78
  else
79
  echo date("M j, Y, g:i:s a",$blockedip->blocked_for_time);
80
- echo "</td><td>".date("M j, Y, g:i:s a",$blockedip->created_timestamp)."</td><td><a onclick=unblockip('".$blockedip->id."')>Unblock IP</a></td></tr>";
81
  }
82
  ?>
83
  </tbody>
@@ -93,7 +88,6 @@
93
  }
94
  else
95
  {
96
- // Change message
97
  echo("IP_IN_WHITELISTED");
98
  exit;
99
  }
@@ -101,14 +95,12 @@
101
  }
102
 
103
 
104
- // Function to handle Manual Block IP form submit
105
  function wpns_handle_unblock_ip($entryID)
106
  {
107
  global $moWpnsUtility;
108
 
109
  if( $moWpnsUtility->check_empty_or_null($entryID))
110
  {
111
- // Change message
112
  echo("UNKNOWN_ERROR");
113
  exit;
114
  }
@@ -117,7 +109,6 @@
117
  $entryid = sanitize_text_field($entryID);
118
  $mo_wpns_config = new MoWpnsHandler();
119
  $mo_wpns_config->unblock_ip_entry($entryid);
120
- //not is structure
121
  ?>
122
  <table id="blockedips_table1" class="display">
123
  <thead><tr><th>IP Address&emsp;&emsp;</th><th>Reason&emsp;&emsp;</th><th>Blocked Until&emsp;&emsp;</th><th>Blocked Date&emsp;&emsp;</th><th>Action&emsp;&emsp;</th></tr></thead>
@@ -129,12 +120,12 @@
129
  global $mo2f_dirName;
130
  foreach($blockedips as $blockedip)
131
  {
132
- echo "<tr class='mo_wpns_not_bold'><td>".$blockedip->ip_address."</td><td>".$blockedip->reason."</td><td>";
133
  if(empty($blockedip->blocked_for_time))
134
  echo "<span class=redtext>Permanently</span>";
135
  else
136
- echo date("M j, Y, g:i:s a",$blockedip->blocked_for_time);
137
- echo "</td><td>".date("M j, Y, g:i:s a",$blockedip->created_timestamp)."</td><td><a onclick=unblockip('".$blockedip->id."')>Unblock IP</a></td></tr>";
138
  }
139
  ?>
140
  </tbody>
@@ -151,35 +142,31 @@
151
  }
152
 
153
 
154
- // Function to handle Whitelist IP form submit
155
  function wpns_handle_whitelist_ip($ip)
156
  {
157
  global $moWpnsUtility;
158
  if( $moWpnsUtility->check_empty_or_null($ip))
159
  {
160
- //change message
161
  echo("EMPTY IP");
162
  exit;
163
  }
164
  if(!preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/',$ip))
165
- { //change message
166
  echo("INVALID_IP");
167
  exit;
168
  }
169
  else
170
  {
171
- $ipAddress = sanitize_text_field($ip);
172
  $mo_wpns_config = new MoWpnsHandler();
173
  if($mo_wpns_config->is_whitelisted($ipAddress))
174
  {
175
- //change message
176
  echo("IP_ALREADY_WHITELISTED");
177
  exit;
178
  }
179
  else
180
  {
181
  $mo_wpns_config->whitelist_ip($ip);
182
- //Structures issues
183
  $mo_wpns_handler = new MoWpnsHandler();
184
  $whitelisted_ips = $mo_wpns_handler->get_whitelisted_ips();
185
 
@@ -190,7 +177,7 @@
190
  <?php
191
  foreach($whitelisted_ips as $whitelisted_ip)
192
  {
193
- echo "<tr class='mo_wpns_not_bold'><td>".$whitelisted_ip->ip_address."</td><td>".date("M j, Y, g:i:s a",$whitelisted_ip->created_timestamp)."</td><td><a onclick=removefromwhitelist('".$whitelisted_ip->id."')>Remove</a></td></tr>";
194
  }
195
 
196
 
@@ -210,7 +197,6 @@
210
  }
211
 
212
 
213
- // Function to handle remove whitelisted IP form submit
214
  function wpns_handle_remove_whitelist($entryID)
215
  {
216
  global $moWpnsUtility;
@@ -236,7 +222,7 @@
236
  <?php
237
  foreach($whitelisted_ips as $whitelisted_ip)
238
  {
239
- echo "<tr class='mo_wpns_not_bold'><td>".$whitelisted_ip->ip_address."</td><td>".date("M j, Y, g:i:s a",$whitelisted_ip->created_timestamp)."</td><td><a onclick=removefromwhitelist('".$whitelisted_ip->id."')>Remove</a></td></tr>";
240
  }
241
 
242
 
5
 
6
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
7
  {
8
+
9
+ switch(sanitize_text_field($_POST['option']))
10
+ {
11
  case "mo_wpns_manual_block_ip":
12
  wpns_handle_manual_block_ip($_POST['IP']); break;
13
  case "mo_wpns_unblock_ip":
29
  $license_url = add_query_arg( array('page' => 'mo_2fa_upgrade'), $_SERVER['REQUEST_URI'] );
30
 
31
 
 
 
 
32
  function wpns_handle_manual_block_ip($ip)
33
  {
 
34
  global $moWpnsUtility;
 
35
  if( $moWpnsUtility->check_empty_or_null( $ip) )
36
  {
 
37
  echo("empty IP");
38
  exit;
39
  }
44
  }
45
  else
46
  {
47
+
48
+
49
+ $ipAddress = filter_var($ip, FILTER_VALIDATE_IP) ? $ip : 'INVALID_IP_FORMAT';
50
  $mo_wpns_config = new MoWpnsHandler();
51
  $isWhitelisted = $mo_wpns_config->is_whitelisted($ipAddress);
52
  if(!$isWhitelisted)
53
  {
54
  if($mo_wpns_config->mo_wpns_is_ip_blocked($ipAddress)){
 
55
  echo("already blocked");
56
  exit;
57
  } else{
58
  $mo_wpns_config->mo_wpns_block_ip($ipAddress, MoWpnsConstants::BLOCKED_BY_ADMIN, true);
 
59
  ?>
60
  <table id="blockedips_table1" class="display">
61
  <thead><tr><th>IP Address&emsp;&emsp;</th><th>Reason&emsp;&emsp;</th><th>Blocked Until&emsp;&emsp;</th><th>Blocked Date&emsp;&emsp;</th><th>Action&emsp;&emsp;</th></tr></thead>
67
  global $mo2f_dirName;
68
  foreach($blockedips as $blockedip)
69
  {
70
+ echo "<tr class='mo_wpns_not_bold'><td>".$blockedip->ip_address."</td><td>".esc_attr($blockedip->reason)."</td><td>";
71
  if(empty($blockedip->blocked_for_time))
72
  echo "<span class=redtext>Permanently</span>";
73
  else
74
  echo date("M j, Y, g:i:s a",$blockedip->blocked_for_time);
75
+ echo "</td><td>".date("M j, Y, g:i:s a",esc_attr($blockedip->created_timestamp))."</td><td><a onclick=unblockip('".esc_html($blockedip->id)."')>Unblock IP</a></td></tr>";
76
  }
77
  ?>
78
  </tbody>
88
  }
89
  else
90
  {
 
91
  echo("IP_IN_WHITELISTED");
92
  exit;
93
  }
95
  }
96
 
97
 
 
98
  function wpns_handle_unblock_ip($entryID)
99
  {
100
  global $moWpnsUtility;
101
 
102
  if( $moWpnsUtility->check_empty_or_null($entryID))
103
  {
 
104
  echo("UNKNOWN_ERROR");
105
  exit;
106
  }
109
  $entryid = sanitize_text_field($entryID);
110
  $mo_wpns_config = new MoWpnsHandler();
111
  $mo_wpns_config->unblock_ip_entry($entryid);
 
112
  ?>
113
  <table id="blockedips_table1" class="display">
114
  <thead><tr><th>IP Address&emsp;&emsp;</th><th>Reason&emsp;&emsp;</th><th>Blocked Until&emsp;&emsp;</th><th>Blocked Date&emsp;&emsp;</th><th>Action&emsp;&emsp;</th></tr></thead>
120
  global $mo2f_dirName;
121
  foreach($blockedips as $blockedip)
122
  {
123
+ echo "<tr class='mo_wpns_not_bold'><td>".$blockedip->ip_address."</td><td>".esc_html($blockedip->reason)."</td><td>";
124
  if(empty($blockedip->blocked_for_time))
125
  echo "<span class=redtext>Permanently</span>";
126
  else
127
+ echo date("M j, Y, g:i:s a",esc_html($blockedip->blocked_for_time));
128
+ echo "</td><td>".date("M j, Y, g:i:s a",esc_html($blockedip->created_timestamp))."</td><td><a onclick=unblockip('".esc_html($blockedip->id)."')>Unblock IP</a></td></tr>";
129
  }
130
  ?>
131
  </tbody>
142
  }
143
 
144
 
 
145
  function wpns_handle_whitelist_ip($ip)
146
  {
147
  global $moWpnsUtility;
148
  if( $moWpnsUtility->check_empty_or_null($ip))
149
  {
 
150
  echo("EMPTY IP");
151
  exit;
152
  }
153
  if(!preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/',$ip))
154
+ {
155
  echo("INVALID_IP");
156
  exit;
157
  }
158
  else
159
  {
160
+ $ipAddress = (filter_var($ip, FILTER_VALIDATE_IP)) ? $ipAddress : 'INVALID_IP';
161
  $mo_wpns_config = new MoWpnsHandler();
162
  if($mo_wpns_config->is_whitelisted($ipAddress))
163
  {
 
164
  echo("IP_ALREADY_WHITELISTED");
165
  exit;
166
  }
167
  else
168
  {
169
  $mo_wpns_config->whitelist_ip($ip);
 
170
  $mo_wpns_handler = new MoWpnsHandler();
171
  $whitelisted_ips = $mo_wpns_handler->get_whitelisted_ips();
172
 
177
  <?php
178
  foreach($whitelisted_ips as $whitelisted_ip)
179
  {
180
+ echo "<tr class='mo_wpns_not_bold'><td>".esc_html($whitelisted_ip->ip_address)."</td><td>".date("M j, Y, g:i:s a",esc_html($whitelisted_ip->created_timestamp))."</td><td><a onclick=removefromwhitelist('".esc_attr($whitelisted_ip->id)."')>Remove</a></td></tr>";
181
  }
182
 
183
 
197
  }
198
 
199
 
 
200
  function wpns_handle_remove_whitelist($entryID)
201
  {
202
  global $moWpnsUtility;
222
  <?php
223
  foreach($whitelisted_ips as $whitelisted_ip)
224
  {
225
+ echo "<tr class='mo_wpns_not_bold'><td>".esc_html($whitelisted_ip->ip_address)."</td><td>".date("M j, Y, g:i:s a",esc_html($whitelisted_ip->created_timestamp))."</td><td><a onclick=removefromwhitelist('".esc_attr($whitelisted_ip->id)."')>Remove</a></td></tr>";
226
  }
227
 
228
 
controllers/malware_scanner/malware_scan_ajax.php CHANGED
@@ -13,7 +13,7 @@ class Mo_wpns_scan_malware
13
  }
14
 
15
  public function mo_wpns_malware_redirect(){
16
- switch($_POST['call_type'])
17
  {
18
  case "submit_malware_settings_form":
19
  $this->mo_wpns_save_malware_config_form($_POST);
13
  }
14
 
15
  public function mo_wpns_malware_redirect(){
16
+ switch (sanitize_text_field(wp_unslash($_POST['call_type'])))
17
  {
18
  case "submit_malware_settings_form":
19
  $this->mo_wpns_save_malware_config_form($_POST);
controllers/notification-settings.php CHANGED
@@ -7,7 +7,7 @@
7
 
8
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
9
  {
10
- switch($_POST['option'])
11
  {
12
  case "mo_wpns_enable_ip_blocked_email_to_admin":
13
  wpns_handle_notify_admin_on_ip_block($_POST); break;
@@ -45,8 +45,7 @@
45
 
46
 
47
 
48
- /* ADMIN NOTIFICATION SETTINGS */
49
- function wpns_handle_admin_email($postValue)
50
  {
51
  $email = sanitize_email($_POST['admin_email_address']);
52
  if(validate_email($email)){
@@ -58,12 +57,12 @@
58
  do_action('wpns_show_message',MoWpnsMessages::showMessage('INVALID_EMAIL'),'ERROR');
59
  }
60
  }
61
- function validate_email($str) {
62
  return (!preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
63
  }
64
 
65
- //Function to handle enabling and disabling of admin notification on ip blocking
66
- function wpns_handle_notify_admin_on_ip_block($postValue)
67
  {
68
  $enable_ip_blocked_email_to_admin = isset($postValue['enable_ip_blocked_email_to_admin']) ? true : false;
69
  update_option( 'mo_wpns_enable_ip_blocked_email_to_admin', $enable_ip_blocked_email_to_admin);
@@ -75,7 +74,6 @@
75
  }
76
 
77
 
78
- //Function to handle enabling and disabling of admin notification on unusual activity
79
  function wpns_handle_notify_unusual_activity($postValue)
80
  {
81
  $enable_unusual_activity_email_to_user = isset($postValue['enable_unusual_activity_email_to_user']) ? true : false;
@@ -88,7 +86,6 @@
88
  }
89
 
90
 
91
- //Function to save unusual activity email template
92
  function wpns_handle_custom_template($template1,$template2=null)
93
  {
94
  if(!is_null($template1))
7
 
8
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
9
  {
10
+ switch(sanitize_text_field(wp_unslash($_POST['option'])))
11
  {
12
  case "mo_wpns_enable_ip_blocked_email_to_admin":
13
  wpns_handle_notify_admin_on_ip_block($_POST); break;
45
 
46
 
47
 
48
+ function wpns_handle_admin_email($postValue)
 
49
  {
50
  $email = sanitize_email($_POST['admin_email_address']);
51
  if(validate_email($email)){
57
  do_action('wpns_show_message',MoWpnsMessages::showMessage('INVALID_EMAIL'),'ERROR');
58
  }
59
  }
60
+ function validate_email($str) {
61
  return (!preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
62
  }
63
 
64
+
65
+ function wpns_handle_notify_admin_on_ip_block($postValue)
66
  {
67
  $enable_ip_blocked_email_to_admin = isset($postValue['enable_ip_blocked_email_to_admin']) ? true : false;
68
  update_option( 'mo_wpns_enable_ip_blocked_email_to_admin', $enable_ip_blocked_email_to_admin);
74
  }
75
 
76
 
 
77
  function wpns_handle_notify_unusual_activity($postValue)
78
  {
79
  $enable_unusual_activity_email_to_user = isset($postValue['enable_unusual_activity_email_to_user']) ? true : false;
86
  }
87
 
88
 
 
89
  function wpns_handle_custom_template($template1,$template2=null)
90
  {
91
  if(!is_null($template1))
controllers/registration-security.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
7
  {
8
- switch($_POST['option'])
9
  {
10
  case "mo_wpns_enable_fake_domain_blocking":
11
  wpns_handle_domain_blocking($_POST); break;
5
 
6
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
7
  {
8
+ switch(sanitize_text_field(wp_unslash($_POST['option'])))
9
  {
10
  case "mo_wpns_enable_fake_domain_blocking":
11
  wpns_handle_domain_blocking($_POST); break;
controllers/request_christmas_offer.php CHANGED
@@ -3,7 +3,7 @@
3
 
4
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
5
  {
6
- switch($_POST['option'])
7
  {
8
  case "mo_2FA_christmas_request_form":
9
  wpns_handle_christmas_request_form($_POST); break;
3
 
4
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
5
  {
6
+ switch(sanitize_text_field(wp_unslash($_POST['option'])))
7
  {
8
  case "mo_2FA_christmas_request_form":
9
  wpns_handle_christmas_request_form($_POST); break;
controllers/request_demo.php CHANGED
@@ -3,7 +3,7 @@
3
 
4
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
5
  {
6
- switch($_POST['option'])
7
  {
8
  case "mo_2FA_demo_request_form":
9
  wpns_handle_demo_request_form($_POST); break;
3
 
4
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
5
  {
6
+ switch(sanitize_text_field(wp_unslash($_POST['option'])))
7
  {
8
  case "mo_2FA_demo_request_form":
9
  wpns_handle_demo_request_form($_POST); break;
controllers/request_offer.php CHANGED
@@ -3,7 +3,7 @@
3
 
4
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
5
  {
6
- switch($_POST['option'])
7
  {
8
  case "mo_2FA_offer_request_form":
9
  wpns_handle_offer_request_form($_POST); break;
3
 
4
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
5
  {
6
+ switch(sanitize_text_field(wp_unslash($_POST['option'])))
7
  {
8
  case "mo_2FA_offer_request_form":
9
  wpns_handle_offer_request_form($_POST); break;
controllers/support.php CHANGED
@@ -6,10 +6,11 @@
6
  {
7
 
8
 
9
- switch($_POST['option'])
10
  {
11
  case "mo_wpns_send_query":
12
- wpns_handle_support_form($_POST['query_email'],$_POST['query'],$_POST['query_phone']); break;
 
13
  }
14
  }
15
 
@@ -36,7 +37,7 @@
36
  return;
37
  }
38
  $query = sanitize_text_field( $query );
39
- $email = sanitize_text_field( $email );
40
  $phone = sanitize_text_field( $phone );
41
  $contact_us = new MocURL();
42
 
6
  {
7
 
8
 
9
+ switch(sanitize_text_field(wp_unslash($_POST['option'])))
10
  {
11
  case "mo_wpns_send_query":
12
+ wpns_handle_support_form(sanitize_email($_POST['query_email']),sanitize_text_field($_POST['query'])
13
+ ,$_POST['query_phone']); break;
14
  }
15
  }
16
 
37
  return;
38
  }
39
  $query = sanitize_text_field( $query );
40
+ $email = sanitize_email( $email );
41
  $phone = sanitize_text_field( $phone );
42
  $contact_us = new MocURL();
43
 
controllers/tour/tour_ajax.php CHANGED
@@ -48,7 +48,7 @@ class Mo_wpns_Tour
48
  }
49
 
50
  public function mo_wpns_tour(){
51
- switch($_POST['call_type'])
52
  {
53
  case "wpns_enable_tour":
54
  update_option('skip_tour', 0);
@@ -114,7 +114,7 @@ class Mo_wpns_Tour
114
  {
115
  $uid = get_current_user_id();
116
  delete_user_meta($uid,'mo2f_visited_pointers');
117
- $page = $_POST['page'];
118
  $page = sanitize_text_field($page[0]);
119
  update_option('mo2f_tour_tab','');
120
  update_option("yeah",1);
48
  }
49
 
50
  public function mo_wpns_tour(){
51
+ switch (sanitize_text_field(wp_unslash($_POST['call_type'])))
52
  {
53
  case "wpns_enable_tour":
54
  update_option('skip_tour', 0);
114
  {
115
  $uid = get_current_user_id();
116
  delete_user_meta($uid,'mo2f_visited_pointers');
117
+ $page = sanirize_text_field($_POST['page']);
118
  $page = sanitize_text_field($page[0]);
119
  update_option('mo2f_tour_tab','');
120
  update_option("yeah",1);
controllers/trial.php CHANGED
@@ -1,6 +1,5 @@
1
  <?php
2
 
3
-
4
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
5
  {
6
  switch(sanitize_text_field($_POST['option']))
@@ -16,7 +15,6 @@
16
  $user_phone = $Mo2fdbQueries->get_user_detail( 'mo2f_user_phone', $current_user->ID );
17
 
18
 
19
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/style_settings.css', dirname(__FILE__)) . '" />';
20
  include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'trial.php';
21
 
22
  function mo2f_handle_trial_request_form($post){
1
  <?php
2
 
 
3
  if(current_user_can( 'manage_options' ) && isset($_POST['option']) )
4
  {
5
  switch(sanitize_text_field($_POST['option']))
15
  $user_phone = $Mo2fdbQueries->get_user_detail( 'mo2f_user_phone', $current_user->ID );
16
 
17
 
 
18
  include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'trial.php';
19
 
20
  function mo2f_handle_trial_request_form($post){
controllers/twofa/mo2fa_common_login.php CHANGED
@@ -6,7 +6,7 @@ function mo2f_collect_device_attributes_handler( $session_id_encrypt,$redirect_t
6
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
  <meta name="viewport" content="width=device-width, initial-scale=1">
8
  <?php
9
- echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>';
10
  ?>
11
  </head>
12
  <body>
@@ -19,15 +19,25 @@ function mo2f_collect_device_attributes_handler( $session_id_encrypt,$redirect_t
19
  ?>
20
  <p><input type="hidden" id="miniorange_rba_attribures" name="miniorange_rba_attribures" value=""/></p>
21
  <?php
22
- echo '<script src="' . plugins_url( 'includes/js/rba/js/jquery-1.9.1.js', dirname(dirname(dirname(__FILE__))) ) . '" ></script>';
23
- echo '<script src="' . plugins_url( 'includes/js/rba/js/jquery.flash.js', dirname(dirname(dirname(__FILE__))) ) . '" ></script>';
24
- echo '<script src="' . plugins_url( 'includes/js/rba/js/ua-parser.js', dirname(dirname(dirname(__FILE__))) ) . '" ></script>';
25
- echo '<script src="' . plugins_url( 'includes/js/rba/js/client.js', dirname(dirname(dirname(__FILE__))) ) . '" ></script>';
26
- echo '<script src="' . plugins_url( 'includes/js/rba/js/device_attributes.js', dirname(dirname(dirname(__FILE__))) ) . '" ></script>';
27
- echo '<script src="' . plugins_url( 'includes/js/rba/js/swfobject.js', dirname(dirname(dirname(__FILE__))) ) . '" ></script>';
28
- echo '<script src="' . plugins_url( 'includes/js/rba/js/fontdetect.js', dirname(dirname(dirname(__FILE__))) ) . '" ></script>';
29
- echo '<script src="' . plugins_url( 'includes/js/rba/js/murmurhash3.js', dirname(dirname(dirname(__FILE__))) ) . '" ></script>';
30
- echo '<script src="' . plugins_url( 'includes/js/rba/js/miniorange-fp.js', dirname(dirname(dirname(__FILE__))) ) . '" ></script>';
 
 
 
 
 
 
 
 
 
 
31
  }
32
  ?>
33
  <input type="hidden" name="miniorange_attribute_collection_nonce"
@@ -1491,9 +1501,13 @@ function mo2f_customize_logo() { ?>
1491
  <?php }
1492
 
1493
  function echo_js_css_files() {
1494
- echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>';
1495
- echo '<script src="' . plugins_url( 'includes/js/bootstrap.min.js', dirname(dirname(__FILE__)) ) . '" ></script>';
1496
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url( 'includes/css/twofa_style_settings.css?version=5.5', dirname(dirname(__FILE__))) . '" />';
 
 
 
 
1497
  }
1498
 
1499
  function mo2f_backup_codes_generate($id, $redirect_to, $session_id_encrypt){
@@ -1534,12 +1548,20 @@ function mo2f_backup_codes_generate($id, $redirect_to, $session_id_encrypt){
1534
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
1535
  <meta name="viewport" content="width=device-width, initial-scale=1">
1536
  <?php
1537
- echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>';
1538
- echo '<script src="' . plugins_url('includes/js/bootstrap.min.js', dirname(dirname(__FILE__))) . '" ></script>';
1539
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/bootstrap.min.css', dirname(dirname(__FILE__))) . '" />';
1540
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/front_end_login.css', dirname(dirname(__FILE__))) . '" />';
1541
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/style_settings.css', dirname(dirname(__FILE__))) . '" />';
1542
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/hide-login.css', dirname(dirname(__FILE__))) . '" />';
 
 
 
 
 
 
 
 
1543
  ?>
1544
  <style>
1545
  .mo2f_kba_ques, .mo2f_table_textbox{
6
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
  <meta name="viewport" content="width=device-width, initial-scale=1">
8
  <?php
9
+ wp_print_scripts( 'jquery' );
10
  ?>
11
  </head>
12
  <body>
19
  ?>
20
  <p><input type="hidden" id="miniorange_rba_attribures" name="miniorange_rba_attribures" value=""/></p>
21
  <?php
22
+ wp_register_script('mo2f_rba_jquery',plugins_url( 'includes/js/rba/js/jquery-1.9.1.js', dirname(dirname(dirname(__FILE__))) ));
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( 'mo2f_rba_jquery');
33
+ wp_print_scripts( 'mo2f_rba_flash');
34
+ wp_print_scripts( 'mo2f_rba_ua_parser');
35
+ wp_print_scripts( 'mo2f_client');
36
+ wp_print_scripts( 'mo2f_device');
37
+ wp_print_scripts( 'mo2f_swfobject');
38
+ wp_print_scripts( 'mo2f_font');
39
+ wp_print_scripts( 'mo2f_murmur');
40
+ wp_print_scripts( 'mo2f_fd');
41
  }
42
  ?>
43
  <input type="hidden" name="miniorange_attribute_collection_nonce"
1501
  <?php }
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
  }
1512
 
1513
  function mo2f_backup_codes_generate($id, $redirect_to, $session_id_encrypt){
1548
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
1549
  <meta name="viewport" content="width=device-width, initial-scale=1">
1550
  <?php
1551
+
1552
+ wp_register_script( 'mo2f_bootstrap_js', plugins_url('includes/js/bootstrap.min.js', dirname(dirname(__FILE__))) );
1553
+ wp_print_scripts( 'jquery' );
1554
+ wp_print_scripts('mo2f_bootstrap_js');
1555
+
1556
+ wp_register_style('mo2f_bootstrap',plugins_url('includes/css/bootstrap.min.css', dirname(dirname(__FILE__))));
1557
+ wp_register_style('mo2f_frontend',plugins_url('includes/css/front_end_login.css', dirname(dirname(__FILE__))));
1558
+ wp_register_style('mo2f_style_settings',plugins_url('includes/css/style_settings.css', dirname(dirname(__FILE__))));
1559
+ wp_register_style('mo2f_hide_login',plugins_url('includes/css/hide-login.css', dirname(dirname(__FILE__))));
1560
+
1561
+ wp_print_styles( 'mo2f_bootstrap');
1562
+ wp_print_styles( 'mo2f_frontend');
1563
+ wp_print_styles( 'mo2f_style_settings');
1564
+ wp_print_styles( 'mo2f_hide_login');
1565
  ?>
1566
  <style>
1567
  .mo2f_kba_ques, .mo2f_table_textbox{
controllers/twofa/mo2fa_inline_registration.php CHANGED
@@ -643,6 +643,8 @@ function prompt_user_for_google_authenticator_setup($current_user_id, $login_sta
643
 
644
  }
645
  }
 
 
646
  ?>
647
  <html>
648
  <head> <meta charset="utf-8"/>
@@ -853,18 +855,26 @@ function prompt_user_for_google_authenticator_setup($current_user_id, $login_sta
853
  </body>
854
  <?php
855
  echo '<head>';
856
- echo '<script type="text/javascript" src="'.plugins_url( "/includes/jquery-qrcode/jquery-qrcode.js", dirname(dirname(__FILE__ ))).'"></script>';
857
- echo '<script type="text/javascript" src="'.plugins_url( "/includes/jquery-qrcode/jquery-qrcode.min.js", dirname(dirname(__FILE__ ))).'"></script>';
858
  echo '</head>';
859
  }
860
 
861
  function mo2f_inline_css_and_js(){
862
- echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>';
863
- echo '<script src="' . plugins_url('includes/js/bootstrap.min.js',dirname(dirname( __FILE__))). '" ></script>';
864
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/bootstrap.min.css', dirname(dirname(__FILE__))) . '" />';
865
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/front_end_login.css',dirname(dirname( __FILE__))). '" />';
866
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/style_settings.css', dirname(dirname(__FILE__))). '" />';
867
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/hide-login.css',dirname(dirname( __FILE__))) . '" />';
 
 
 
 
 
 
 
 
868
  }
869
 
870
 
@@ -1377,10 +1387,14 @@ $current_user = get_userdata($current_user_id);
1377
  <meta name="viewport" content="width=device-width, initial-scale=1">
1378
  <?php
1379
  mo2f_inline_css_and_js();
 
 
 
 
 
1380
 
1381
- echo '<script src="' . plugins_url('includes/js/bootstrap.min.js',dirname(dirname(__FILE__))) . '" ></script>';
1382
- echo '<script src="' . plugins_url('includes/js/phone.js',dirname(dirname( __FILE__))). '" ></script>';
1383
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/phone.css', dirname(dirname(__FILE__))). '" />';
1384
  ?>
1385
  </head>
1386
  <body>
@@ -1437,7 +1451,7 @@ $current_user = get_userdata($current_user_id);
1437
 
1438
  ?>
1439
  <input type="text" name="verify_chatID" id="chatID"
1440
- value="<?php echo $chat_id; ?>" pattern="[\+]?[0-9]{1,4}\s?[0-9]{7,12}" required="true" title="<?php echo __('Enter chat ID without any space or dashes', 'miniorange-2-factor-authentication'); ?>" /><br />
1441
 
1442
  <?php
1443
  echo "<br>";
643
 
644
  }
645
  }
646
+ wp_register_script('mo2f_qr_code_js',plugins_url( "/includes/jquery-qrcode/jquery-qrcode.js", dirname(dirname(__FILE__ ))) );
647
+ wp_register_script('mo2f_qr_code_minjs',plugins_url( "/includes/jquery-qrcode/jquery-qrcode.min.js", dirname(dirname(__FILE__ ))) );
648
  ?>
649
  <html>
650
  <head> <meta charset="utf-8"/>
855
  </body>
856
  <?php
857
  echo '<head>';
858
+ wp_print_scripts( 'mo2f_qr_code_js' );
859
+ wp_print_scripts( 'mo2f_qr_code_minjs' );
860
  echo '</head>';
861
  }
862
 
863
  function mo2f_inline_css_and_js(){
864
+
865
+ wp_register_style( 'mo2f_bootstrap',plugins_url('includes/css/bootstrap.min.css', dirname(dirname(__FILE__))));
866
+ wp_register_style('mo2f_front_end_login',plugins_url('includes/css/front_end_login.css',dirname(dirname( __FILE__))));
867
+ wp_register_style('mo2f_style_setting',plugins_url('includes/css/style_settings.css', dirname(dirname(__FILE__))));
868
+ wp_register_style('mo2f_hide-login',plugins_url('includes/css/hide-login.css',dirname(dirname( __FILE__))));
869
+
870
+ wp_print_styles( 'mo2f_bootstrap');
871
+ wp_print_styles( 'mo2f_front_end_login');
872
+ wp_print_styles( 'mo2f_style_setting');
873
+ wp_print_styles( 'mo2f_hide-login');
874
+
875
+ wp_register_script('mo2f_bootstrap_js',plugins_url('includes/js/bootstrap.min.js',dirname(dirname( __FILE__))));
876
+ wp_print_scripts( 'jquery');
877
+ wp_print_scripts( 'mo2f_bootstrap_js' );
878
  }
879
 
880
 
1387
  <meta name="viewport" content="width=device-width, initial-scale=1">
1388
  <?php
1389
  mo2f_inline_css_and_js();
1390
+
1391
+ wp_register_script('mo2f_bootstrap_js', plugins_url('includes/js/bootstrap.min.js',dirname(dirname(__FILE__))));
1392
+ wp_register_script('mo2f_phone_js', plugins_url('includes/js/phone.js',dirname(dirname( __FILE__))));
1393
+ wp_print_scripts( 'mo2f_bootstrap_js' );
1394
+ wp_print_scripts( 'mo2f_phone_js');
1395
 
1396
+ wp_register_style('mo2f_phone',plugins_url('includes/css/phone.css', dirname(dirname(__FILE__))));
1397
+ wp_print_styles( 'mo2f_phone' );
 
1398
  ?>
1399
  </head>
1400
  <body>
1451
 
1452
  ?>
1453
  <input type="text" name="verify_chatID" id="chatID"
1454
+ value="<?php echo esc_html($chat_id); ?>" pattern="[\+]?[0-9]{1,4}\s?[0-9]{7,12}" required="true" title="<?php echo __('Enter chat ID without any space or dashes', 'miniorange-2-factor-authentication'); ?>" /><br />
1455
 
1456
  <?php
1457
  echo "<br>";
controllers/twofa/setup_twofa.php CHANGED
@@ -15,7 +15,7 @@
15
 
16
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
17
  {
18
- switch($_POST['option'])
19
  {
20
  case "mo2f_enable_2FA_on_login_page_option":
21
  wpns_handle_enable_2fa_login_prompt(($_POST));
15
 
16
  if(current_user_can( 'manage_options' ) && isset($_POST['option']))
17
  {
18
+ switch(sanitize_text_field(wp_unslash($_POST['option'])))
19
  {
20
  case "mo2f_enable_2FA_on_login_page_option":
21
  wpns_handle_enable_2fa_login_prompt(($_POST));
controllers/twofa/two_fa_unlimittedUser_ajax.php CHANGED
@@ -35,11 +35,11 @@ function wpns_handle_save()
35
  foreach($enabledrole as $role){
36
  update_option($role, 1);
37
  }
38
- update_option('mo2fa_author_login_url',$_POST['mo2fa_author_login_url']);
39
- update_option('mo2fa_subscriber_login_url',$_POST['mo2fa_subscriber_login_url']);
40
- update_option('mo2fa_contributor_login_url',$_POST['mo2fa_contributor_login_url']);
41
- update_option('mo2fa_editor_login_url',$_POST['mo2fa_editor_login_url']);
42
- update_option('mo2fa_administrator_login_url',$_POST['mo2fa_administrator_login_url']);
43
  wp_send_json('true');
44
  return;
45
  }
35
  foreach($enabledrole as $role){
36
  update_option($role, 1);
37
  }
38
+ update_option('mo2fa_author_login_url', sanitize_url( $_POST['mo2fa_author_login_url']));
39
+ update_option('mo2fa_subscriber_login_url', sanitize_url($_POST['mo2fa_subscriber_login_url']));
40
+ update_option('mo2fa_contributor_login_url', sanitize_url($_POST['mo2fa_contributor_login_url']));
41
+ update_option('mo2fa_editor_login_url', sanitize_url($_POST['mo2fa_editor_login_url']));
42
+ update_option('mo2fa_administrator_login_url', sanitize_url($_POST['mo2fa_administrator_login_url']));
43
  wp_send_json('true');
44
  return;
45
  }
controllers/twofa/two_factor_ajax.php CHANGED
@@ -13,7 +13,7 @@ class mo_2f_ajax
13
 
14
  function mo_two_factor_ajax(){
15
  $GLOBALS['mo2f_is_ajax_request'] = true;
16
- switch ($_POST['mo_2f_two_factor_ajax']) {
17
  case 'mo2f_ajax_login_redirect':
18
  $this->mo2f_ajax_login_redirect(); break;
19
  case 'mo2f_save_email_verification':
@@ -136,7 +136,7 @@ class mo_2f_ajax
136
  function mo_2fa_send_otp_token()
137
  {
138
  $enduser = new Customer_Setup();
139
- $email = sanitize_text_field($_POST['phone']);
140
  $customer_key = get_site_option('mo2f_customerKey');
141
  $api_key = get_site_option('mo2f_api_key');
142
  $selected_2FA_method = sanitize_text_field($_POST['selected_2FA_method']);
@@ -663,7 +663,7 @@ class mo_2f_ajax
663
  function mo_wpns_register_verify_customer()
664
  {
665
  $res ="";
666
- if(isset($_POST['Login_and_Continue']) && $_POST['Login_and_Continue'] =='Login and Continue')
667
  $res = $this->_verify_customer($_POST);
668
 
669
  else
@@ -899,7 +899,7 @@ class mo_2f_ajax
899
 
900
  if(isset($_POST['email']))
901
  {
902
- $email = sanitize_text_field($_POST['email']);
903
  }
904
 
905
  $enduser = new Two_Factor_Setup();
13
 
14
  function mo_two_factor_ajax(){
15
  $GLOBALS['mo2f_is_ajax_request'] = true;
16
+ switch (sanitize_text_field(wp_unslash($_POST['mo_2f_two_factor_ajax']))) {
17
  case 'mo2f_ajax_login_redirect':
18
  $this->mo2f_ajax_login_redirect(); break;
19
  case 'mo2f_save_email_verification':
136
  function mo_2fa_send_otp_token()
137
  {
138
  $enduser = new Customer_Setup();
139
+ $email = sanitize_email($_POST['phone']);
140
  $customer_key = get_site_option('mo2f_customerKey');
141
  $api_key = get_site_option('mo2f_api_key');
142
  $selected_2FA_method = sanitize_text_field($_POST['selected_2FA_method']);
663
  function mo_wpns_register_verify_customer()
664
  {
665
  $res ="";
666
+ if(isset($_POST['Login_and_Continue']) && sanitize_text_field($_POST['Login_and_Continue']) =='Login and Continue')
667
  $res = $this->_verify_customer($_POST);
668
 
669
  else
899
 
900
  if(isset($_POST['email']))
901
  {
902
+ $email = sanitize_email($_POST['email']);
903
  }
904
 
905
  $enduser = new Two_Factor_Setup();
controllers/wpns-loginsecurity-ajax.php CHANGED
@@ -16,7 +16,7 @@ class wpns_ajax
16
 
17
  function mo2f_ajax(){
18
  $GLOBALS['mo2f_is_ajax_request'] = true;
19
- switch ($_POST['mo2f_ajax_option']) {
20
  case "mo2f_ajax_kba":
21
  $this->mo2f_ajax_kba();break;
22
  case "mo2f_ajax_login":
@@ -47,7 +47,7 @@ class wpns_ajax
47
  }
48
  }
49
  function wpns_login_security(){
50
- switch($_POST['wpns_loginsecurity_ajax'])
51
  {
52
  case "wpns_bruteforce_form":
53
  $this->wpns_handle_bf_configuration_form(); break;
@@ -83,8 +83,8 @@ class wpns_ajax
83
  }
84
 
85
  function update_plan(){
86
- $mo2f_all_plannames = $_POST['planname'];
87
- $mo_2fa_plan_type = $_POST['planType'];
88
  update_site_option('mo2f_planname', $mo2f_all_plannames);
89
  if ($mo2f_all_plannames == 'addon_plan')
90
  {
@@ -177,7 +177,7 @@ class wpns_ajax
177
  $two_fa_settings->mo_auth_deactivate();
178
 
179
  }
180
- // It is the new line added for the database updation
181
  function waf_settings_mail_form_notify()
182
  {
183
  $nonce = sanitize_text_field($_POST['nonce']);
@@ -203,7 +203,7 @@ class wpns_ajax
203
  wp_send_json('ERROR');
204
  return;
205
  }
206
- $mo2f_mail_noyifying_IP = sanitize_text_field($_POST['Smail']);
207
  update_site_option('mo2f_mail_notify', $mo2f_mail_noyifying_IP);
208
  if($mo2f_mail_noyifying_IP == "on"){
209
  wp_send_json('true');
@@ -214,8 +214,8 @@ class wpns_ajax
214
  }
215
  function wpns_all_plans()
216
  {
217
- $mo2f_all_plannames = $_POST['planname'];
218
- $mo_2fa_plan_type = $_POST['planType'];
219
  update_site_option('mo2f_planname', $mo2f_all_plannames);
220
  if ($mo2f_all_plannames == 'addon_plan')
221
  {
@@ -230,17 +230,17 @@ class wpns_ajax
230
  }
231
  function wpns_handle_bf_configuration_form(){
232
 
233
- $nonce = $_POST['nonce'];
234
  if ( ! wp_verify_nonce( $nonce, 'wpns-brute-force' ) ){
235
  wp_send_json('ERROR');
236
  return;
237
  }
238
- $brute_force = $_POST['bf_enabled/disabled'];
239
  if($brute_force == 'true'){$brute_force = "on";}else if($brute_force == 'false') {$brute_force = "";}
240
- $login_attempts = $_POST['allwed_login_attempts'];
241
- $blocking_type = $_POST['time_of_blocking_type'];
242
- $blocking_value = isset($_POST['time_of_blocking_val']) ? $_POST['time_of_blocking_val'] : false;
243
- $show_login_attempts= $_POST['show_remaining_attempts'];
244
  if($show_login_attempts == 'true'){$show_login_attempts = "on";} else if($show_login_attempts == 'false') { $show_login_attempts = "";}
245
  if($brute_force == 'on' && $login_attempts == "" ){
246
  wp_send_json('empty');
@@ -262,6 +262,7 @@ class wpns_ajax
262
  }
263
  function wpns_handle_IP_blocking()
264
  {
 
265
 
266
  global $mo2f_dirName;
267
  if(!wp_verify_nonce($_POST['nonce'],'manualIPBlockingNonce'))
@@ -271,8 +272,10 @@ class wpns_ajax
271
  }
272
  else
273
  {
 
274
  include_once($mo2f_dirName.'controllers'.DIRECTORY_SEPARATOR.'ip-blocking.php');
275
  }
 
276
  }
277
  function wpns_whitelist_ip()
278
  {
@@ -308,8 +311,12 @@ class wpns_ajax
308
  echo("INVALID_IP");
309
  exit;
310
  }
311
- $result=@json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip),true);
312
- $hostname = gethostbyaddr($result["geoplugin_request"]);
 
 
 
 
313
  try{
314
  $timeoffset = timezone_offset_get(new DateTimeZone($result["geoplugin_timezone"]),new DateTime('now'));
315
  $timeoffset = $timeoffset/3600;
@@ -384,7 +391,7 @@ class wpns_ajax
384
  }
385
  else
386
  {
387
- switch ($_POST['optionValue']) {
388
  case "SQL":
389
  $this->savesql(); break;
390
  case "XSS":
@@ -476,7 +483,7 @@ class wpns_ajax
476
  update_option('Rate_request',$req);
477
  if(isset($_POST['rateCheck']))
478
  {
479
- if($_POST['rateCheck'] == 'on')
480
  {
481
  update_option('Rate_limiting','1');
482
  echo "RateEnabled";
16
 
17
  function mo2f_ajax(){
18
  $GLOBALS['mo2f_is_ajax_request'] = true;
19
+ switch (sanitize_text_field(wp_unslash($_POST['mo2f_ajax_option']))) {
20
  case "mo2f_ajax_kba":
21
  $this->mo2f_ajax_kba();break;
22
  case "mo2f_ajax_login":
47
  }
48
  }
49
  function wpns_login_security(){
50
+ switch(sanitize_text_field(wp_unslash($_POST['wpns_loginsecurity_ajax'])))
51
  {
52
  case "wpns_bruteforce_form":
53
  $this->wpns_handle_bf_configuration_form(); break;
83
  }
84
 
85
  function update_plan(){
86
+ $mo2f_all_plannames = sanitize_text_field($_POST['planname']);
87
+ $mo_2fa_plan_type = sanitize_text_field($_POST['planType']);
88
  update_site_option('mo2f_planname', $mo2f_all_plannames);
89
  if ($mo2f_all_plannames == 'addon_plan')
90
  {
177
  $two_fa_settings->mo_auth_deactivate();
178
 
179
  }
180
+
181
  function waf_settings_mail_form_notify()
182
  {
183
  $nonce = sanitize_text_field($_POST['nonce']);
203
  wp_send_json('ERROR');
204
  return;
205
  }
206
+ $mo2f_mail_noyifying_IP = sanitize_email($_POST['Smail']);
207
  update_site_option('mo2f_mail_notify', $mo2f_mail_noyifying_IP);
208
  if($mo2f_mail_noyifying_IP == "on"){
209
  wp_send_json('true');
214
  }
215
  function wpns_all_plans()
216
  {
217
+ $mo2f_all_plannames = sanitize_text_field($_POST['planname']);
218
+ $mo_2fa_plan_type = sanitize_text_field($_POST['planType']);
219
  update_site_option('mo2f_planname', $mo2f_all_plannames);
220
  if ($mo2f_all_plannames == 'addon_plan')
221
  {
230
  }
231
  function wpns_handle_bf_configuration_form(){
232
 
233
+ $nonce = sanitize_text_field($_POST['nonce']);
234
  if ( ! wp_verify_nonce( $nonce, 'wpns-brute-force' ) ){
235
  wp_send_json('ERROR');
236
  return;
237
  }
238
+ $brute_force =sanitize_text_field($_POST['bf_enabled/disabled']);
239
  if($brute_force == 'true'){$brute_force = "on";}else if($brute_force == 'false') {$brute_force = "";}
240
+ $login_attempts = sanitize_text_field($_POST['allwed_login_attempts']);
241
+ $blocking_type = sanitize_text_field($_POST['time_of_blocking_type']);
242
+ $blocking_value = isset($_POST['time_of_blocking_val']) ? sanitize_text_field($_POST['time_of_blocking_val']) : false;
243
+ $show_login_attempts= sanitize_text_field($_POST['show_remaining_attempts']);
244
  if($show_login_attempts == 'true'){$show_login_attempts = "on";} else if($show_login_attempts == 'false') { $show_login_attempts = "";}
245
  if($brute_force == 'on' && $login_attempts == "" ){
246
  wp_send_json('empty');
262
  }
263
  function wpns_handle_IP_blocking()
264
  {
265
+
266
 
267
  global $mo2f_dirName;
268
  if(!wp_verify_nonce($_POST['nonce'],'manualIPBlockingNonce'))
272
  }
273
  else
274
  {
275
+
276
  include_once($mo2f_dirName.'controllers'.DIRECTORY_SEPARATOR.'ip-blocking.php');
277
  }
278
+
279
  }
280
  function wpns_whitelist_ip()
281
  {
311
  echo("INVALID_IP");
312
  exit;
313
  }
314
+ $result=wp_remote_get("http://www.geoplugin.net/json.gp?ip=".$ip);
315
+
316
+ if( !is_wp_error( $result ) ) {
317
+ $result=wp_remote_retrieve_body( $result);
318
+ }
319
+
320
  try{
321
  $timeoffset = timezone_offset_get(new DateTimeZone($result["geoplugin_timezone"]),new DateTime('now'));
322
  $timeoffset = $timeoffset/3600;
391
  }
392
  else
393
  {
394
+ switch (sanitize_text_field(wp_unslash($_POST['optionValue']))) {
395
  case "SQL":
396
  $this->savesql(); break;
397
  case "XSS":
483
  update_option('Rate_request',$req);
484
  if(isset($_POST['rateCheck']))
485
  {
486
+ if(sanitize_text_field($_POST['rateCheck']) == 'on')
487
  {
488
  update_option('Rate_limiting','1');
489
  echo "RateEnabled";
handler/WAF/mo-waf-real-time.php CHANGED
@@ -6,7 +6,6 @@ function add_to_blacklist($ipaddress,$domain)
6
  {
7
  $customer_key = base64_encode(get_option("mo2f_customerKey"));
8
  $api_key = base64_encode(get_option("mo2f_api_key"));
9
- $ch = curl_init();
10
  $url = MoWpnsConstants::REAL_TIME_IP_HOST.'/realtimeIPBlocking/add_to_blacklist_free.php';
11
 
12
 
@@ -17,19 +16,16 @@ function add_to_blacklist($ipaddress,$domain)
17
  'mo2f_api_key' =>$api_key
18
  );
19
 
 
 
 
 
 
 
 
20
 
21
-
22
- curl_setopt_array($ch, array(
23
- CURLOPT_URL => $url,
24
- CURLOPT_RETURNTRANSFER => true,
25
- CURLOPT_POST => true,
26
- CURLOPT_SSL_VERIFYHOST => 0,
27
- CURLOPT_SSL_VERIFYPEER => 0,
28
- CURLOPT_POSTFIELDS => $postData
29
- ));
30
-
31
- $output = curl_exec($ch);
32
- curl_close($ch);
33
 
34
  if($output == 'SUCCESS')
35
  {
6
  {
7
  $customer_key = base64_encode(get_option("mo2f_customerKey"));
8
  $api_key = base64_encode(get_option("mo2f_api_key"));
 
9
  $url = MoWpnsConstants::REAL_TIME_IP_HOST.'/realtimeIPBlocking/add_to_blacklist_free.php';
10
 
11
 
16
  'mo2f_api_key' =>$api_key
17
  );
18
 
19
+ $args = array(
20
+ 'method' => 'POST',
21
+ 'timeout' => 10,
22
+ 'sslverify' => false,
23
+ 'headers' => array(),
24
+ 'body' => $postdata,
25
+ );
26
 
27
+ $mo2f_api=new Mo2f_Api();
28
+ $output=$mo2f_api->mo2f_wp_remote_post($url,$args);
 
 
 
 
 
 
 
 
 
 
29
 
30
  if($output == 'SUCCESS')
31
  {
handler/ajax.php CHANGED
@@ -68,7 +68,12 @@ class AjaxHandler
68
 
69
  private function lookupIP($ip)
70
  {
71
- $result=@json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip),true);
 
 
 
 
 
72
  $hostname = gethostbyaddr($result["geoplugin_request"]);
73
  try{
74
  $timeoffset = timezone_offset_get(new DateTimeZone($result["geoplugin_timezone"]),new DateTime('now'));
68
 
69
  private function lookupIP($ip)
70
  {
71
+ $result=wp_remote_get("http://www.geoplugin.net/json.gp?ip=".$ip);
72
+
73
+ if( !is_wp_error( $result ) ) {
74
+ $result=wp_remote_retrieve_body( $result);
75
+ }
76
+
77
  $hostname = gethostbyaddr($result["geoplugin_request"]);
78
  try{
79
  $timeoffset = timezone_offset_get(new DateTimeZone($result["geoplugin_timezone"]),new DateTime('now'));
handler/feedback_form.php CHANGED
@@ -12,7 +12,7 @@ class FeedbackHandler
12
  global $moWpnsUtility, $mo2f_dirName;
13
 
14
  if (current_user_can('manage_options') && isset($_POST['option'])) {
15
- switch ($_REQUEST['option']) {
16
  case "mo_wpns_skip_feedback":
17
  case "mo_wpns_rating":
18
  case "mo_wpns_feedback":
@@ -39,7 +39,7 @@ class FeedbackHandler
39
  }
40
 
41
  $user = wp_get_current_user();
42
- $feedback_option = $_POST['option'];
43
  if ($feedback_option != "mo_wpns_rating")
44
  {
45
  $message = 'Plugin Deactivated';
12
  global $moWpnsUtility, $mo2f_dirName;
13
 
14
  if (current_user_can('manage_options') && isset($_POST['option'])) {
15
+ switch (sanitize_text_field(wp_unslash($_REQUEST['option']))) {
16
  case "mo_wpns_skip_feedback":
17
  case "mo_wpns_rating":
18
  case "mo_wpns_feedback":
39
  }
40
 
41
  $user = wp_get_current_user();
42
+ $feedback_option = sanitize_text_field($_POST['option']);
43
  if ($feedback_option != "mo_wpns_rating")
44
  {
45
  $message = 'Plugin Deactivated';
handler/login.php CHANGED
@@ -103,10 +103,10 @@ class LoginHandler
103
 
104
  if(isset($_POST['option']))
105
  {
106
- switch($_POST['option'])
107
  {
108
  case "mo_wpns_change_password":
109
- $this->handle_change_password(sanitize_text_field($_POST['username'])
110
  ,sanitize_text_field($_POST['new_password']),sanitize_text_field($_POST['confirm_password']));
111
  break;
112
  }
@@ -302,7 +302,7 @@ class LoginHandler
302
 
303
  if(isset($_POST['log']) && isset($_POST['pwd'])){
304
  $username = sanitize_text_field($_POST['log']);
305
- $pass = sanitize_text_field($_POST['pwd']);
306
  $user = get_user_by('login',$username);
307
 
308
  if(!MoWpnsUtility::get_mo2f_db_option('mo2f_enforce_strong_passswords', 'get_option')){
103
 
104
  if(isset($_POST['option']))
105
  {
106
+ switch(sanitize_text_field(wp_unslash($_POST['option'])))
107
  {
108
  case "mo_wpns_change_password":
109
+ $this->handle_change_password(sanitize_user($_POST['username'])
110
  ,sanitize_text_field($_POST['new_password']),sanitize_text_field($_POST['confirm_password']));
111
  break;
112
  }
302
 
303
  if(isset($_POST['log']) && isset($_POST['pwd'])){
304
  $username = sanitize_text_field($_POST['log']);
305
+ $pass = $_POST['pwd'];
306
  $user = get_user_by('login',$username);
307
 
308
  if(!MoWpnsUtility::get_mo2f_db_option('mo2f_enforce_strong_passswords', 'get_option')){
handler/malware_scanner.php CHANGED
@@ -180,13 +180,13 @@ class Mo_wpns_Scan_Handler{
180
  if ($type=='plugins') {
181
  $download_link="https://downloads.wordpress.org/plugin/".$zip_name.".".$version.".zip";
182
  $plugin_name=$zip_name.'.'.$version;
183
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", file_get_contents($download_link));
184
  if( $download_result){
185
  $result = $this->unzip_downloaded_repo($zip_name, $path);
186
  return $result;
187
  }else {
188
  $download_link="https://downloads.wordpress.org/plugin/".$zip_name.".zip";
189
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", file_get_contents($download_link));
190
  if( $download_result){
191
  $result = $this->unzip_downloaded_repo($zip_name, $path);
192
  return $result;
@@ -199,13 +199,13 @@ class Mo_wpns_Scan_Handler{
199
  } else if($type=='themes'){
200
  $theme_name=$zip_name.'.'.$version;
201
  $download_link="https://downloads.wordpress.org/theme/".$theme_name.".zip";
202
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", file_get_contents($download_link));
203
  if( $download_result){
204
  $result = $this->unzip_downloaded_repo($zip_name, $path);
205
  return $result;
206
  }else {
207
  $download_link="https://downloads.wordpress.org/theme/".$zip_name.".zip";
208
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", file_get_contents($download_link));
209
  if( $download_result){
210
  $result = $this->unzip_downloaded_repo($zip_name, $path);
211
  return $result;
@@ -217,7 +217,7 @@ class Mo_wpns_Scan_Handler{
217
  }
218
  } else {
219
  $download_link="https://wordpress.org/wordpress-".$version.".zip";
220
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.'.zip', file_get_contents($download_link));
221
  if($download_result){
222
  $result=$this->unzip_downloaded_repo($zip_name, $path);
223
  return $result;
@@ -433,17 +433,20 @@ class Mo_wpns_Scan_Handler{
433
 
434
  function mo_wpns_malware_scan_request( $host, $content_type,$postdata = array()){
435
  $response = null;
436
- $ch=curl_init($host);
437
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
438
- curl_setopt( $ch, CURLOPT_ENCODING, "" );
439
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
440
- curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
441
- curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );
442
- curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type: '.$content_type) );
443
- curl_setopt( $ch, CURLOPT_POST, true );
444
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $postdata);
445
- $results=curl_exec($ch);
446
- curl_close($ch);
 
 
 
447
  if($results==false){
448
  error_log('Unable to scan file: '.$postdata['file']->name.' with result: '.$result);
449
  }else{
180
  if ($type=='plugins') {
181
  $download_link="https://downloads.wordpress.org/plugin/".$zip_name.".".$version.".zip";
182
  $plugin_name=$zip_name.'.'.$version;
183
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", wp_remote_retrieve_body(wp_remote_get($download_link)));
184
  if( $download_result){
185
  $result = $this->unzip_downloaded_repo($zip_name, $path);
186
  return $result;
187
  }else {
188
  $download_link="https://downloads.wordpress.org/plugin/".$zip_name.".zip";
189
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", wp_remote_retrieve_body(wp_remote_get($download_link)));
190
  if( $download_result){
191
  $result = $this->unzip_downloaded_repo($zip_name, $path);
192
  return $result;
199
  } else if($type=='themes'){
200
  $theme_name=$zip_name.'.'.$version;
201
  $download_link="https://downloads.wordpress.org/theme/".$theme_name.".zip";
202
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", wp_remote_retrieve_body(wp_remote_get($download_link)));
203
  if( $download_result){
204
  $result = $this->unzip_downloaded_repo($zip_name, $path);
205
  return $result;
206
  }else {
207
  $download_link="https://downloads.wordpress.org/theme/".$zip_name.".zip";
208
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", wp_remote_retrieve_body(wp_remote_get($download_link)));
209
  if( $download_result){
210
  $result = $this->unzip_downloaded_repo($zip_name, $path);
211
  return $result;
217
  }
218
  } else {
219
  $download_link="https://wordpress.org/wordpress-".$version.".zip";
220
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.'.zip', wp_remote_retrieve_body(wp_remote_get($download_link)));
221
  if($download_result){
222
  $result=$this->unzip_downloaded_repo($zip_name, $path);
223
  return $result;
433
 
434
  function mo_wpns_malware_scan_request( $host, $content_type,$postdata = array()){
435
  $response = null;
436
+
437
+ $args = array(
438
+ 'method' => 'POST',
439
+ 'body' => $json_string,
440
+ 'timeout' => '5',
441
+ 'redirection' => '5',
442
+ 'sslverify' =>true,
443
+ 'httpversion' => '1.0',
444
+ 'blocking' => true,
445
+ 'headers' => $http_header_array
446
+ );
447
+
448
+ $mo2f_api=new Mo2f_Api();
449
+ $results=$mo2f_api->mo2f_wp_remote_post($url,$args);
450
  if($results==false){
451
  error_log('Unable to scan file: '.$postdata['file']->name.' with result: '.$result);
452
  }else{
handler/malware_scanner/malware_scanner_cron.php CHANGED
@@ -375,13 +375,13 @@ class Mo_wpns_Scan_Handler_Cron{
375
  $download_link="https://downloads.wordpress.org/plugin/".$zip_name.".".$version.".zip";
376
  $plugin_name=$zip_name.'.'.$version;
377
 
378
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", file_get_contents($download_link));
379
  if( $download_result){
380
  $result = $this->unzip_downloaded_repo($zip_name, $path);
381
  return $result;
382
  }else {
383
  $download_link="https://downloads.wordpress.org/plugin/".$zip_name.".zip";
384
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", file_get_contents($download_link));
385
  if( $download_result){
386
  $result = $this->unzip_downloaded_repo($zip_name, $path);
387
  return $result;
@@ -399,13 +399,13 @@ class Mo_wpns_Scan_Handler_Cron{
399
  } else if($type=='themes'){
400
  $theme_name=$zip_name.'.'.$version;
401
  $download_link="https://downloads.wordpress.org/theme/".$theme_name.".zip";
402
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", file_get_contents($download_link));
403
  if( $download_result){
404
  $result = $this->unzip_downloaded_repo($zip_name, $path);
405
  return $result;
406
  }else {
407
  $download_link="https://downloads.wordpress.org/theme/".$zip_name.".zip";
408
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", file_get_contents($download_link));
409
  if( $download_result){
410
  $result = $this->unzip_downloaded_repo($zip_name, $path);
411
  return $result;
@@ -424,7 +424,7 @@ class Mo_wpns_Scan_Handler_Cron{
424
  } else {
425
  update_site_option('mo2f_current_repo_key', 'core');
426
  $download_link="https://wordpress.org/wordpress-".$version.".zip";
427
- $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.'.zip', file_get_contents($download_link));
428
  if($download_result){
429
  $result=$this->unzip_downloaded_repo($zip_name, $path);
430
  return $result;
@@ -490,18 +490,21 @@ class Mo_wpns_Scan_Handler_Cron{
490
 
491
  function mo_wpns_malware_scan_request( $host, $content_type,$postdata = array()){
492
  $response = null;
493
- $ch=curl_init($host);
494
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
495
- curl_setopt( $ch, CURLOPT_ENCODING, "" );
496
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
497
- curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
498
- curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );
499
- curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type: '.$content_type) );
500
- curl_setopt( $ch, CURLOPT_POST, true );
501
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $postdata);
502
- curl_setopt($ch, CURLOPT_TIMEOUT, 5);
503
- $results=curl_exec($ch);
504
- curl_close($ch);
 
 
 
505
  if($results==false){
506
 
507
  }else{
375
  $download_link="https://downloads.wordpress.org/plugin/".$zip_name.".".$version.".zip";
376
  $plugin_name=$zip_name.'.'.$version;
377
 
378
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", wp_remote_retrieve_body(wp_remote_get($download_link)));
379
  if( $download_result){
380
  $result = $this->unzip_downloaded_repo($zip_name, $path);
381
  return $result;
382
  }else {
383
  $download_link="https://downloads.wordpress.org/plugin/".$zip_name.".zip";
384
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", wp_remote_retrieve_body(wp_remote_get($download_link)));
385
  if( $download_result){
386
  $result = $this->unzip_downloaded_repo($zip_name, $path);
387
  return $result;
399
  } else if($type=='themes'){
400
  $theme_name=$zip_name.'.'.$version;
401
  $download_link="https://downloads.wordpress.org/theme/".$theme_name.".zip";
402
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", wp_remote_retrieve_body(wp_remote_get($download_link)));
403
  if( $download_result){
404
  $result = $this->unzip_downloaded_repo($zip_name, $path);
405
  return $result;
406
  }else {
407
  $download_link="https://downloads.wordpress.org/theme/".$zip_name.".zip";
408
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.".zip", wp_remote_retrieve_body(wp_remote_get($download_link)));
409
  if( $download_result){
410
  $result = $this->unzip_downloaded_repo($zip_name, $path);
411
  return $result;
424
  } else {
425
  update_site_option('mo2f_current_repo_key', 'core');
426
  $download_link="https://wordpress.org/wordpress-".$version.".zip";
427
+ $download_result=@file_put_contents($path.DIRECTORY_SEPARATOR.$zip_name.'.zip', wp_remote_retrieve_body(wp_remote_get($download_link)));
428
  if($download_result){
429
  $result=$this->unzip_downloaded_repo($zip_name, $path);
430
  return $result;
490
 
491
  function mo_wpns_malware_scan_request( $host, $content_type,$postdata = array()){
492
  $response = null;
493
+
494
+ $args = array(
495
+ 'method' => 'POST',
496
+ 'body' => $json_string,
497
+ 'timeout' => '5',
498
+ 'redirection' => '5',
499
+ 'sslverify' =>true,
500
+ 'httpversion' => '1.0',
501
+ 'blocking' => true,
502
+ 'headers' => $http_header_array
503
+ );
504
+
505
+ $mo2f_api=new Mo2f_Api();
506
+ $results=$mo2f_api->mo2f_wp_remote_post($url,$args);
507
+
508
  if($results==false){
509
 
510
  }else{
handler/mo-waf.php CHANGED
@@ -101,19 +101,22 @@
101
  $ipaddress = '';
102
  if (isset($_SERVER['HTTP_CLIENT_IP']))
103
  $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
104
- else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
105
  $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
106
- else if(isset($_SERVER['HTTP_X_FORWARDED']))
107
  $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
108
- else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
109
  $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
110
- else if(isset($_SERVER['HTTP_FORWARDED']))
111
  $ipaddress = $_SERVER['HTTP_FORWARDED'];
112
- else if(isset($_SERVER['REMOTE_ADDR']))
113
  $ipaddress = $_SERVER['REMOTE_ADDR'];
114
  else
115
  $ipaddress = 'UNKNOWN';
116
 
 
 
 
117
  $query = 'select * from '.$prefix.'mo2f_network_blocked_ips where ip_address="'.$ipaddress.'";';
118
  $results = mysqli_query($dbcon,$query);
119
  if($results)
101
  $ipaddress = '';
102
  if (isset($_SERVER['HTTP_CLIENT_IP']))
103
  $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
104
+ elseif(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
105
  $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
106
+ elseif(isset($_SERVER['HTTP_X_FORWARDED']))
107
  $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
108
+ elseif(isset($_SERVER['HTTP_FORWARDED_FOR']))
109
  $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
110
+ elseif(isset($_SERVER['HTTP_FORWARDED']))
111
  $ipaddress = $_SERVER['HTTP_FORWARDED'];
112
+ elseif(isset($_SERVER['REMOTE_ADDR']))
113
  $ipaddress = $_SERVER['REMOTE_ADDR'];
114
  else
115
  $ipaddress = 'UNKNOWN';
116
 
117
+
118
+ $ipaddress = filter_var($ipaddress, FILTER_VALIDATE_IP) ? $ipaddress : 'UNKNOWN';
119
+
120
  $query = 'select * from '.$prefix.'mo2f_network_blocked_ips where ip_address="'.$ipaddress.'";';
121
  $results = mysqli_query($dbcon,$query);
122
  if($results)
handler/recaptcha.php CHANGED
@@ -81,7 +81,9 @@
81
  show_google_recaptcha_form_v3_login();
82
  else if(get_option('mo_wpns_recaptcha_version')=='reCAPTCHA_v2')
83
  {
84
- echo "<script src='".MoWpnsConstants::RECAPTCHA_URL."'></script>";
 
 
85
  echo '<div class="g-recaptcha" data-sitekey="'.get_option("mo_wpns_recaptcha_site_key").'"></div>';
86
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#loginform{padding-bottom:20px;}</style>';
87
  }
@@ -100,39 +102,41 @@
100
  }
101
  }
102
 
103
- function woocommerce_register_with_captcha(){
104
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_registration'))
105
  {
106
- echo "<script src='".MoWpnsConstants::RECAPTCHA_URL."'></script>";
 
107
  echo '<div class="g-recaptcha" data-sitekey="'.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>';
109
  }
110
  }
111
 
112
- function woocommerce_login_with_captcha(){
113
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_login'))
114
  {
115
 
116
- echo "<script src='".MoWpnsConstants::RECAPTCHA_URL."'></script>";
117
-
118
  echo '<div class="g-recaptcha" data-sitekey="'.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>';
120
  }
121
  }
122
 
123
- function woocommerce_register_with_captcha_checkout(){
124
 
125
  if (!is_user_logged_in()){
126
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_registration'))
127
  {
128
- echo "<script src='".MoWpnsConstants::RECAPTCHA_URL."'></script>";
 
129
  echo '<div class="g-recaptcha" data-sitekey="'.get_option("mo_wpns_recaptcha_site_key").'"></div>';
130
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
131
  }
132
  }
133
  }
134
 
135
- public static function recaptcha_verify($response)
136
  {
137
  global $moWpnsUtility;
138
  $userIp = $moWpnsUtility->get_client_ip();
81
  show_google_recaptcha_form_v3_login();
82
  else if(get_option('mo_wpns_recaptcha_version')=='reCAPTCHA_v2')
83
  {
84
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
85
+ wp_enqueue_script( 'mo2f_catpcha_js' );
86
+
87
  echo '<div class="g-recaptcha" data-sitekey="'.get_option("mo_wpns_recaptcha_site_key").'"></div>';
88
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#loginform{padding-bottom:20px;}</style>';
89
  }
102
  }
103
  }
104
 
105
+ function woocommerce_register_with_captcha(){
106
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_registration'))
107
  {
108
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
109
+ wp_enqueue_script( 'mo2f_catpcha_js' );
110
  echo '<div class="g-recaptcha" data-sitekey="'.get_option("mo_wpns_recaptcha_site_key").'"></div>';
111
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
112
  }
113
  }
114
 
115
+ function woocommerce_login_with_captcha(){
116
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_login'))
117
  {
118
 
119
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
120
+ wp_enqueue_script( 'mo2f_catpcha_js' );
121
  echo '<div class="g-recaptcha" data-sitekey="'.get_option("mo_wpns_recaptcha_site_key").'"></div>';
122
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#loginform{padding-bottom:20px;}</style>';
123
  }
124
  }
125
 
126
+ function woocommerce_register_with_captcha_checkout(){
127
 
128
  if (!is_user_logged_in()){
129
  if(get_option('mo_wpns_activate_recaptcha_for_woocommerce_registration'))
130
  {
131
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
132
+ wp_enqueue_script( 'mo2f_catpcha_js' );
133
  echo '<div class="g-recaptcha" data-sitekey="'.get_option("mo_wpns_recaptcha_site_key").'"></div>';
134
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
135
  }
136
  }
137
  }
138
 
139
+ public static function recaptcha_verify($response)
140
  {
141
  global $moWpnsUtility;
142
  $userIp = $moWpnsUtility->get_client_ip();
handler/spam.php CHANGED
@@ -34,7 +34,8 @@
34
  echo '<input type="hidden" name="mocomment" />';
35
  if(get_option('mo_wpns_enable_comment_recaptcha'))
36
  {
37
- echo '<script src="'.MoWpnsConstants::RECAPTCHA_URL.'"></script>';
 
38
  echo '<div class="g-recaptcha" data-sitekey="'.get_option('mo_wpns_recaptcha_site_key').'"></div>';
39
  }
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));
38
+ wp_enqueue_script( 'mo2f_catpcha_js' );
39
  echo '<div class="g-recaptcha" data-sitekey="'.get_option('mo_wpns_recaptcha_site_key').'"></div>';
40
  }
41
  }
handler/twofa/{two_fa_short_custom.php → class-twofacustomregformshortcode.php} RENAMED
@@ -23,10 +23,9 @@ class TwoFACustomRegFormShortcode
23
  switch($_POST['mo_action'])
24
  {
25
  case "challenge":
26
- $email = sanitize_text_field($_POST['email']);
27
  $phone = sanitize_text_field($_POST['phone']);
28
  $authTypeSend = sanitize_text_field($_POST['authTypeSend']);
29
-
30
  TwoFACustomRegFormAPI::challenge($phone,$email,$authTypeSend);
31
  break;
32
 
@@ -41,19 +40,14 @@ class TwoFACustomRegFormShortcode
41
  public function mo_ajax_register(){
42
  switch ($_POST['mo_action']) {
43
  case 'send_otp_over_email':
44
- $email = isset($_POST['email'])? $_POST['email']: "";
45
- $phone = isset($_POST['phone'])? $_POST['phone']: "";
46
- $email = sanitize_text_field($email);
47
- $phone = sanitize_text_field($phone);
48
  $authTypeSend = sanitize_text_field($_POST['authTypeSend']);
49
  TwoFACustomRegFormAPI :: challenge($phone,$email,$authTypeSend);
50
- # code...
51
  break;
52
  case 'send_otp_over_sms' :
53
- $email = isset($_POST['email'])? $_POST['email']: "";
54
- $phone = isset($_POST['phone'])? $_POST['phone']: "";
55
- $email = sanitize_text_field($email);
56
- $phone = sanitize_text_field($phone);
57
  $authTypeSend = sanitize_text_field($_POST['authTypeSend']);
58
  TwoFACustomRegFormAPI :: challenge($phone,$email,$authTypeSend);
59
  break;
@@ -62,19 +56,14 @@ class TwoFACustomRegFormShortcode
62
  $otp = sanitize_text_field($_POST['otp']);
63
  $txId = sanitize_text_field($_POST['txId']);
64
  TwoFACustomRegFormAPI :: validate($txId,$otp);
65
- # code...
66
  break;
67
  }
68
  }
69
 
70
  function wc_post_registration( $user_id, $new_customer_data, $password_generated) {
71
  if ( isset( $_POST['phone'] ))
72
- update_user_meta($user_id, 'billing_phone', $_POST['phone']);
73
  }
74
-
75
-
76
-
77
-
78
  }
79
 
80
 
23
  switch($_POST['mo_action'])
24
  {
25
  case "challenge":
26
+ $email = sanitize_email($_POST['email']);
27
  $phone = sanitize_text_field($_POST['phone']);
28
  $authTypeSend = sanitize_text_field($_POST['authTypeSend']);
 
29
  TwoFACustomRegFormAPI::challenge($phone,$email,$authTypeSend);
30
  break;
31
 
40
  public function mo_ajax_register(){
41
  switch ($_POST['mo_action']) {
42
  case 'send_otp_over_email':
43
+ $email = isset($_POST['email'])? sanitize_email($_POST['email']): "";
44
+ $phone = isset($_POST['phone'])? sanitize_text_field($_POST['phone']): "";
 
 
45
  $authTypeSend = sanitize_text_field($_POST['authTypeSend']);
46
  TwoFACustomRegFormAPI :: challenge($phone,$email,$authTypeSend);
 
47
  break;
48
  case 'send_otp_over_sms' :
49
+ $email = isset($_POST['email'])? sanitize_email($_POST['email']): "";
50
+ $phone = isset($_POST['phone'])? sanitize_text_field($_POST['phone']): "";
 
 
51
  $authTypeSend = sanitize_text_field($_POST['authTypeSend']);
52
  TwoFACustomRegFormAPI :: challenge($phone,$email,$authTypeSend);
53
  break;
56
  $otp = sanitize_text_field($_POST['otp']);
57
  $txId = sanitize_text_field($_POST['txId']);
58
  TwoFACustomRegFormAPI :: validate($txId,$otp);
 
59
  break;
60
  }
61
  }
62
 
63
  function wc_post_registration( $user_id, $new_customer_data, $password_generated) {
64
  if ( isset( $_POST['phone'] ))
65
+ update_user_meta($user_id, 'billing_phone', sanitize_text_field($_POST['phone']));
66
  }
 
 
 
 
67
  }
68
 
69
 
handler/twofa/setup_twofa.php CHANGED
@@ -691,8 +691,7 @@ function display_customer_registration_forms($user){
691
  <input type="hidden" name="option" value="mo2f_registration_closed"/>
692
  </form>
693
  </div>
694
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
695
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
696
  <script>
697
  function show_content() {
698
  jQuery('#mo2f_register').slideToggle();
@@ -707,6 +706,8 @@ function display_customer_registration_forms($user){
707
  </script>
708
 
709
  <?php
 
 
710
  }
711
 
712
  function mo2f_show_registration_screen($user){
691
  <input type="hidden" name="option" value="mo2f_registration_closed"/>
692
  </form>
693
  </div>
694
+
 
695
  <script>
696
  function show_content() {
697
  jQuery('#mo2f_register').slideToggle();
706
  </script>
707
 
708
  <?php
709
+ wp_register_script( 'mo2f_bootstrap_js',plugins_url( 'includes/js/bootstrap.min.js', dirname(dirname(__FILE__)) ) );
710
+ wp_print_scripts( 'mo2f_bootstrap_js' );
711
  }
712
 
713
  function mo2f_show_registration_screen($user){
handler/twofa/two_fa_duo_handler.php CHANGED
@@ -255,31 +255,37 @@ function options($options)
255
  return sprintf("%s: %s", $key, $value);
256
  }, array_keys($headers), array_values($headers));
257
 
258
- curl_setopt($ch, CURLOPT_URL, $url);
259
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
 
 
 
 
 
 
 
260
 
261
  if ($method === "POST") {
262
- curl_setopt($ch, CURLOPT_POST, true);
263
- curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
264
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, null);
265
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
266
- } elseif ($method === "GET") {
267
- curl_setopt($ch, CURLOPT_HTTPGET, true);
268
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, null);
269
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
270
- } else {
271
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
272
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
273
  }
274
- $result = curl_exec($ch);
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  $http_status_code = null;
277
  $success = true;
278
  if ($result === false) {
279
- $error = curl_error($ch);
280
- $errno = curl_errno($ch);
281
-
282
-
283
  $result = json_encode(
284
  [
285
  'stat' => 'FAIL',
@@ -289,11 +295,11 @@ function options($options)
289
  );
290
  $success = false;
291
  } else {
292
- $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
293
  }
294
 
295
  return [
296
- "response" => $result,
297
  "success" => $success,
298
  "http_status_code" => $http_status_code
299
  ];
255
  return sprintf("%s: %s", $key, $value);
256
  }, array_keys($headers), array_values($headers));
257
 
258
+
259
+ $args = array(
260
+ 'method' => $method,
261
+ 'timeout' => '5',
262
+ 'redirection' => '5',
263
+ 'httpversion' => '1.0',
264
+ 'blocking' => true,
265
+ 'headers' => $headers
266
+ );
267
 
268
  if ($method === "POST") {
269
+ $args['body']=$body;
 
 
 
 
 
 
 
 
 
 
270
  }
 
271
 
272
+
273
+ $result=wp_remote_post($url,$args);
274
+
275
+ if(is_wp_error($result)){
276
+ return [
277
+ "response" => '',
278
+ "success" => '',
279
+ "http_status_code" => ''
280
+ ];
281
+ }
282
+
283
+ $status_code=wp_remote_retrieve_response_code($result);
284
+
285
  $http_status_code = null;
286
  $success = true;
287
  if ($result === false) {
288
+
 
 
 
289
  $result = json_encode(
290
  [
291
  'stat' => 'FAIL',
295
  );
296
  $success = false;
297
  } else {
298
+ $http_status_code = isset($status_code)?$status_code:'404';
299
  }
300
 
301
  return [
302
+ "response" => $result['body'],
303
  "success" => $success,
304
  "http_status_code" => $http_status_code
305
  ];
handler/twofa/two_fa_login.php CHANGED
@@ -173,7 +173,7 @@ class Miniorange_Mobile_Login {
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.5', dirname(dirname(__FILE__)) );
177
  $hidepath = str_replace('/handler/includes/css', '/includes/css', $hidepath);
178
 
179
  wp_register_style( 'hide-login', $hidepath );
@@ -235,7 +235,7 @@ class Miniorange_Mobile_Login {
235
 
236
  if(MO2F_IS_ONPREM)
237
  {
238
- $userName = isset($_POST['mo2fa_username']) ? sanitize_text_field($_POST['mo2fa_username']) : '';
239
 
240
  if(!empty($userName))
241
  {
@@ -256,7 +256,7 @@ class Miniorange_Mobile_Login {
256
  $mo2f_user_login = is_null( $user ) ? null : $user->user_login;
257
  ?>
258
  <script>
259
- jQuery('#user_login').val(<?php echo "'" . $mo2f_user_login . "'"; ?>);
260
  </script><?php
261
  } else {
262
  $this->mo_2_factor_show_login();
@@ -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.5', dirname(dirname(__FILE__ ))) );
274
  wp_enqueue_style( 'show-login' );
275
  }
276
 
@@ -291,9 +291,9 @@ class Miniorange_Mobile_Login {
291
  }
292
 
293
  function mo_2_factor_show_login() {
294
- $hidepath = plugins_url( 'includes/css/hide-login-form.css?version=5.5.5', dirname(dirname(__FILE__)) );
295
 
296
- $showpath = plugins_url( 'includes/css/show-login.css?version=5.5.5', dirname(dirname(__FILE__ )));
297
 
298
  if ( get_option( 'mo2f_enable_login_with_2nd_factor' ) ) {
299
  wp_register_style( 'show-login', $hidepath );
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 );
235
 
236
  if(MO2F_IS_ONPREM)
237
  {
238
+ $userName = isset($_POST['mo2fa_username']) ? sanitize_user($_POST['mo2fa_username']) : '';
239
 
240
  if(!empty($userName))
241
  {
256
  $mo2f_user_login = is_null( $user ) ? null : $user->user_login;
257
  ?>
258
  <script>
259
+ jQuery('#user_login').val(<?php echo "'" . esc_html($mo2f_user_login) . "'"; ?>);
260
  </script><?php
261
  } else {
262
  $this->mo_2_factor_show_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
 
291
  }
292
 
293
  function mo_2_factor_show_login() {
294
+ $hidepath = plugins_url( 'includes/css/hide-login-form.css?version=5.5.7', dirname(dirname(__FILE__)) );
295
 
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 );
handler/twofa/two_fa_pass2login.php CHANGED
@@ -49,7 +49,7 @@ class Miniorange_Password_2Factor_Login {
49
  function mo2f_inline_register(){
50
  global $moWpnsUtility, $Mo2fdbQueries;
51
  $email = sanitize_email($_POST['email']);
52
- $company = $_SERVER["SERVER_NAME"];
53
  $password = sanitize_text_field($_POST['password']);
54
  $confirmPassword = sanitize_text_field($_POST['confirmPassword']);
55
  $session_id_encrypt = isset( $_POST['session_id'] ) ? sanitize_text_field($_POST['session_id']) : null;
@@ -348,7 +348,7 @@ class Miniorange_Password_2Factor_Login {
348
  update_option( 'mo_2factor_admin_registration_status', 'MO_2_FACTOR_CUSTOMER_REGISTERED_SUCCESS' );
349
  update_option( 'mo_2factor_user_registration_status', 'MO_2_FACTOR_PLUGIN_SETTINGS' );
350
  $Mo2fdbQueries->update_user_details( $user_id, array(
351
- 'mo2f_user_email' =>$email
352
  ) );
353
  }
354
  function mo2f_inline_validate_otp(){
@@ -523,22 +523,17 @@ class Miniorange_Password_2Factor_Login {
523
  'mo2f_chatid' => $chatID
524
  );
525
 
526
- $handle = curl_init();
527
-
528
- curl_setopt_array($handle,
529
- array(
530
- CURLOPT_URL => $url,
531
- CURLOPT_POST => true,
532
- CURLOPT_POSTFIELDS => $postdata,
533
- CURLOPT_RETURNTRANSFER => true,
534
- CURLOPT_SSL_VERIFYHOST => FALSE,
535
- CURLOPT_SSL_VERIFYPEER => FALSE,
536
-
537
- )
538
  );
 
 
 
539
 
540
- $data = curl_exec($handle);
541
- curl_close($handle);
542
  if($data == 'SUCCESS')
543
  $mo2fa_login_message = 'An OTP has been sent to your given chat ID. Please enter it below for verification.';
544
  else
@@ -792,7 +787,7 @@ class Miniorange_Password_2Factor_Login {
792
  $user_id = MO2f_Utility::mo2f_get_transient($session_id_encrypt, 'mo2f_current_user_id');
793
  $redirect_to = isset( $_POST['redirect_to'] ) ? esc_url_raw($_POST['redirect_to']) : null;
794
  $selected_2factor_method = $Mo2fdbQueries->get_user_detail('mo2f_configured_2FA_method',$user_id);
795
- $email = $Mo2fdbQueries->get_user_detail('mo2f_user_email',$user_id);
796
  $Mo2fdbQueries->update_user_details( $user_id, array(
797
  'mobile_registration_status' =>true,
798
  ) );
@@ -1970,13 +1965,13 @@ function check_miniorange_duo_push_validation_failed($POSTED){
1970
  $this->miniorange_pass2login_start_session();
1971
  $mobile_login = new Miniorange_Mobile_Login();
1972
  //validation and sanitization
1973
- $username = isset( $_POST['mo2fa_username'] ) ? sanitize_text_field($_POST['mo2fa_username']) : '';
1974
  if ( MO2f_Utility::mo2f_check_empty_or_null( $username ) ) {
1975
  MO2f_Utility::set_user_values($session_id, 'mo2f_login_message', 'Please enter username to proceed' );
1976
  $mobile_login->mo_auth_show_error_message();
1977
  return;
1978
  } else {
1979
- $username = sanitize_text_field( $_POST['mo2fa_username'] );
1980
  }
1981
  if ( username_exists( $username ) ) { /*if username exists in wp site */
1982
  $user = new WP_User( $username );
@@ -2925,22 +2920,17 @@ function check_miniorange_duo_push_validation_failed($POSTED){
2925
  'mo2f_chatid' => $chatID
2926
  );
2927
 
2928
- $handle = curl_init();
2929
-
2930
- curl_setopt_array($handle,
2931
- array(
2932
- CURLOPT_URL => $url,
2933
- CURLOPT_POST => true,
2934
- CURLOPT_POSTFIELDS => $postdata,
2935
- CURLOPT_RETURNTRANSFER => true,
2936
- CURLOPT_SSL_VERIFYHOST => FALSE,
2937
- CURLOPT_SSL_VERIFYPEER => FALSE,
2938
-
2939
- )
2940
  );
2941
 
2942
- $data = curl_exec($handle);
2943
- curl_close($handle);
 
2944
  if($data == 'SUCCESS')
2945
  {
2946
  $mo2fa_login_message ='Please enter the one time passcode sent on your<b> Telegram</b> app.';
@@ -3590,9 +3580,9 @@ function mo2fa_select_method($currentuser, $mo2f_second_factor, $otp_token,$sess
3590
  <td>
3591
 
3592
  <p style='margin-top:0;margin-bottom:10px'>
3593
- <p style='margin-top:0;margin-bottom:10px'> <h1 style='color:".$color.";text-align:center;font-size:50px'>".$head ."</h1></p>
3594
  <p style='margin-top:0;margin-bottom:10px'>
3595
- <p style='margin-top:0;margin-bottom:10px;text-align:center'><h2 style='text-align:center'>".$body."</h2></p>
3596
  <p style='margin-top:0;margin-bottom:0px;font-size:11px'>
3597
 
3598
  </td>
49
  function mo2f_inline_register(){
50
  global $moWpnsUtility, $Mo2fdbQueries;
51
  $email = sanitize_email($_POST['email']);
52
+ $company = sanitize_text_field($_SERVER["SERVER_NAME"]);
53
  $password = sanitize_text_field($_POST['password']);
54
  $confirmPassword = sanitize_text_field($_POST['confirmPassword']);
55
  $session_id_encrypt = isset( $_POST['session_id'] ) ? sanitize_text_field($_POST['session_id']) : null;
348
  update_option( 'mo_2factor_admin_registration_status', 'MO_2_FACTOR_CUSTOMER_REGISTERED_SUCCESS' );
349
  update_option( 'mo_2factor_user_registration_status', 'MO_2_FACTOR_PLUGIN_SETTINGS' );
350
  $Mo2fdbQueries->update_user_details( $user_id, array(
351
+ 'mo2f_user_email' =>sanitize_email($email)
352
  ) );
353
  }
354
  function mo2f_inline_validate_otp(){
523
  'mo2f_chatid' => $chatID
524
  );
525
 
526
+ $args = array(
527
+ 'method' => 'POST',
528
+ 'timeout' => 10,
529
+ 'sslverify' => false,
530
+ 'headers' => array(),
531
+ 'body' => $postdata,
 
 
 
 
 
 
532
  );
533
+
534
+ $mo2f_api=new Mo2f_Api();
535
+ $data=$mo2f_api->mo2f_wp_remote_post($url,$args);
536
 
 
 
537
  if($data == 'SUCCESS')
538
  $mo2fa_login_message = 'An OTP has been sent to your given chat ID. Please enter it below for verification.';
539
  else
787
  $user_id = MO2f_Utility::mo2f_get_transient($session_id_encrypt, 'mo2f_current_user_id');
788
  $redirect_to = isset( $_POST['redirect_to'] ) ? esc_url_raw($_POST['redirect_to']) : null;
789
  $selected_2factor_method = $Mo2fdbQueries->get_user_detail('mo2f_configured_2FA_method',$user_id);
790
+ $email = sanitize_email($Mo2fdbQueries->get_user_detail('mo2f_user_email',$user_id));
791
  $Mo2fdbQueries->update_user_details( $user_id, array(
792
  'mobile_registration_status' =>true,
793
  ) );
1965
  $this->miniorange_pass2login_start_session();
1966
  $mobile_login = new Miniorange_Mobile_Login();
1967
  //validation and sanitization
1968
+ $username = isset( $_POST['mo2fa_username'] ) ? sanitize_user($_POST['mo2fa_username']) : '';
1969
  if ( MO2f_Utility::mo2f_check_empty_or_null( $username ) ) {
1970
  MO2f_Utility::set_user_values($session_id, 'mo2f_login_message', 'Please enter username to proceed' );
1971
  $mobile_login->mo_auth_show_error_message();
1972
  return;
1973
  } else {
1974
+ $username = sanitize_user( $_POST['mo2fa_username'] );
1975
  }
1976
  if ( username_exists( $username ) ) { /*if username exists in wp site */
1977
  $user = new WP_User( $username );
2920
  'mo2f_chatid' => $chatID
2921
  );
2922
 
2923
+ $args = array(
2924
+ 'method' => 'POST',
2925
+ 'timeout' => 10,
2926
+ 'sslverify' => false,
2927
+ 'headers' => array(),
2928
+ 'body' => $postdata,
 
 
 
 
 
 
2929
  );
2930
 
2931
+ $mo2f_api=new Mo2f_Api();
2932
+ $data=$mo2f_api->mo2f_wp_remote_post($url,$args);
2933
+
2934
  if($data == 'SUCCESS')
2935
  {
2936
  $mo2fa_login_message ='Please enter the one time passcode sent on your<b> Telegram</b> app.';
3580
  <td>
3581
 
3582
  <p style='margin-top:0;margin-bottom:10px'>
3583
+ <p style='margin-top:0;margin-bottom:10px'> <h1 style='color:".$color.";text-align:center;font-size:50px'>".esc_html($head)."</h1></p>
3584
  <p style='margin-top:0;margin-bottom:10px'>
3585
+ <p style='margin-top:0;margin-bottom:10px;text-align:center'><h2 style='text-align:center'>".esc_html($body)."</h2></p>
3586
  <p style='margin-top:0;margin-bottom:0px;font-size:11px'>
3587
 
3588
  </td>
handler/twofa/two_fa_settings.php CHANGED
@@ -467,21 +467,20 @@ class Miniorange_Authentication {
467
  */
468
 
469
  private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $footer = '' ) {
470
-
 
 
 
 
 
471
  $contact_url = 'https://wordpress.org/plugins/miniorange-2-factor-authentication/';
472
  echo '<head>';
473
- echo '<script type="text/javascript" src="'.plugins_url( "/includes/jquery-qrcode/jquery-qrcode.js", dirname(dirname(__FILE__ ))).'"></script>';
474
- echo '<script type="text/javascript" src="'.plugins_url( "/includes/jquery-qrcode/jquery-qrcode.min.js", dirname(dirname(__FILE__ ))).'"></script>';
475
- echo '<script type="text/javascript" src="'.plugins_url( "/includes/js/phone.js", dirname(dirname(__FILE__ ))).'"></script>';
476
-
477
- echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/phone.css', dirname(dirname(__FILE__))). '" />';
478
- // echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/twofa_style_settings.css', dirname(dirname(__FILE__))). '" />';
479
- // echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('includes/css/style_settings.css', dirname(dirname(__FILE__))). '" />';
480
-
481
-
482
  echo '</head>';
483
 
484
-
485
  ?>
486
  <style type="text/css">
487
  #mo2f-setup-wizard-settings-area {
@@ -1875,7 +1874,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1875
  update_option('mo2f_encryption_key',$get_encryption_key);
1876
  }
1877
 
1878
- if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_auth_deactivate_account" ) {
1879
  $nonce = $_POST['mo_auth_deactivate_account_nonce'];
1880
  if ( ! wp_verify_nonce( $nonce, 'mo-auth-deactivate-account-nonce' ) ) {
1881
  $error = new WP_Error();
@@ -1886,7 +1885,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1886
  $url = admin_url( 'plugins.php' );
1887
  wp_redirect( $url );
1888
  }
1889
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_auth_remove_account" ) {
1890
  $nonce = $_POST['mo_auth_remove_account_nonce'];
1891
  if ( ! wp_verify_nonce( $nonce, 'mo-auth-remove-account-nonce' ) ) {
1892
  $error = new WP_Error();
@@ -1896,7 +1895,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1896
  update_option( 'mo2f_register_with_another_email', 1 );
1897
  $this->mo_auth_deactivate();
1898
  }
1899
- }else if(isset($_POST['option']) and $_POST['option'] == 'mo2f_skiplogin'){
1900
  $nonce = $_POST['mo2f_skiplogin_nonce'];
1901
  if ( ! wp_verify_nonce( $nonce, 'miniorange-2-factor-skiplogin-failed-nonce' ) ) {
1902
  $error = new WP_Error();
@@ -1905,7 +1904,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1905
  } else {
1906
  update_option('mo2f_tour_started',2);
1907
  }
1908
- }else if(isset($_POST['option']) and $_POST['option'] == 'mo2f_userlogout'){
1909
  $nonce = $_POST['mo2f_userlogout_nonce'];
1910
  if ( ! wp_verify_nonce( $nonce, 'miniorange-2-factor-userlogout-failed-nonce' ) ) {
1911
  $error = new WP_Error();
@@ -1916,7 +1915,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1916
  wp_logout();
1917
  wp_redirect(admin_url());
1918
  }
1919
- }else if(isset($_POST['option']) and $_POST['option'] == 'restart_plugin_tour'){
1920
  $nonce = $_POST['_wpnonce'];
1921
  if ( ! wp_verify_nonce( $nonce, 'restart_plugin_tour' ) ) {
1922
  $error = new WP_Error();
@@ -1961,7 +1960,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1961
  header("Location: ".$redirect);
1962
  return;
1963
  }
1964
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo2f_save_proxy_settings" ) {
1965
  $nonce = $_POST['mo2f_save_proxy_settings_nonce'];
1966
  if ( ! wp_verify_nonce( $nonce, 'mo2f-save-proxy-settings-nonce' ) ) {
1967
  $error = new WP_Error();
@@ -1981,7 +1980,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
1981
  $this->mo_auth_show_success_message();
1982
  }
1983
 
1984
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_auth_register_customer" ) { //register the admin to miniOrange
1985
  //miniorange_register_customer_nonce
1986
  $nonce = $_POST['miniorange_register_customer_nonce'];
1987
  if ( ! wp_verify_nonce( $nonce, 'miniorange-register-customer-nonce' ) ) {
@@ -2050,7 +2049,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2050
  }
2051
  }
2052
  }
2053
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_auth_verify_customer" ) { //register the admin to miniOrange if already exist
2054
 
2055
  $nonce = $_POST['miniorange_verify_customer_nonce'];
2056
 
@@ -2181,7 +2180,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2181
 
2182
  delete_option( 'mo2f_password' );
2183
  }
2184
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo_2factor_phone_verification' ) { //at registration time
2185
  $phone = sanitize_text_field( $_POST['phone_number'] );
2186
  $Mo2fdbQueries->update_user_details( $user->ID, array( 'mo2f_user_phone' => $phone ) );
2187
 
@@ -2212,7 +2211,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2212
  $this->mo_auth_show_error_message();
2213
  }
2214
 
2215
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_2factor_resend_otp" ) { //resend OTP over email for admin
2216
 
2217
  $nonce = $_POST['mo_2factor_resend_otp_nonce'];
2218
 
@@ -2245,9 +2244,9 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2245
  }
2246
 
2247
 
2248
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo2f_dismiss_notice_option" ) {
2249
  update_option( 'mo2f_bug_fix_done', 1 );
2250
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_2factor_validate_otp" ) { //validate OTP over email for admin
2251
 
2252
  $nonce = $_POST['mo_2factor_validate_otp_nonce'];
2253
 
@@ -2291,7 +2290,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2291
  }
2292
  }
2293
  }
2294
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_2factor_validate_user_otp" ) { //validate OTP over email for additional admin
2295
 
2296
  //validation and sanitization
2297
  $nonce = $_POST['mo_2factor_validate_user_otp_nonce'];
@@ -2334,7 +2333,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2334
  }
2335
 
2336
  }
2337
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_2factor_send_query" ) { //Help me or support
2338
  $nonce = $_POST['mo_2factor_send_query_nonce'];
2339
 
2340
  if ( ! wp_verify_nonce( $nonce, 'mo-2factor-send-query-nonce' ) ) {
@@ -2375,7 +2374,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2375
  }
2376
  }
2377
 
2378
- else if(isset( $_POST['option'] ) and $_POST['option'] == 'woocommerce_disable_login_prompt' ){
2379
  if(isset($_POST['woocommerce_login_prompt'])){
2380
  update_site_option('mo2f_woocommerce_login_prompt' , true);
2381
  }
@@ -2384,10 +2383,10 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2384
  }
2385
  }
2386
 
2387
- else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo_auth_advanced_options_save' ) {
2388
  update_option( 'mo2f_message', 'Your settings are saved successfully.' );
2389
  $this->mo_auth_show_success_message();
2390
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo_auth_login_settings_save' ) {
2391
  $nonce = $_POST['mo_auth_login_settings_save_nonce'];
2392
  if ( ! wp_verify_nonce( $nonce, 'mo-auth-login-settings-save-nonce' ) ) {
2393
  $error = new WP_Error();
@@ -2439,7 +2438,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2439
  $this->mo_auth_show_error_message();
2440
  }
2441
  }
2442
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_auth_sync_sms_transactions" ) {
2443
  $customer = new Customer_Setup();
2444
  $content = json_decode( $customer->get_customer_transactions( get_option( 'mo2f_customerKey' ), get_option( 'mo2f_api_key' ),get_site_option('mo2f_license_type') ), true );
2445
  if ( ! array_key_exists( 'smsRemaining', $content ) ) {
@@ -2456,7 +2455,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2456
 
2457
  }
2458
 
2459
- if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo2f_fix_database_error' ) {
2460
  $nonce = $_POST['mo2f_fix_database_error_nonce'];
2461
 
2462
  if ( ! wp_verify_nonce( $nonce, 'mo2f-fix-database-error-nonce' ) ) {
@@ -2470,7 +2469,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2470
  $Mo2fdbQueries->database_table_issue();
2471
 
2472
  }
2473
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo2f_registration_closed' ) {
2474
  $nonce = $_POST['mo2f_registration_closed_nonce'];
2475
  if ( ! wp_verify_nonce( $nonce, 'mo2f-registration-closed-nonce' ) ) {
2476
  $error = new WP_Error();
@@ -2482,7 +2481,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2482
  update_option( 'mo2f_message', $mo2f_message );
2483
  $this->mo_auth_show_success_message();
2484
  }
2485
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo2f_goto_verifycustomer" ) {
2486
  $nonce = $_POST['mo2f_goto_verifycustomer_nonce'];
2487
  if ( ! wp_verify_nonce( $nonce, 'mo2f-goto-verifycustomer-nonce' ) ) {
2488
  $error = new WP_Error();
@@ -2493,7 +2492,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2493
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "ENTER_YOUR_EMAIL_PASSWORD" ) );
2494
  update_option('mo_2factor_user_registration_status','MO_2_FACTOR_VERIFY_CUSTOMER');
2495
  }
2496
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo_2factor_gobackto_registration_page' ) { //back to registration page for admin
2497
  $nonce = $_POST['mo_2factor_gobackto_registration_page_nonce'];
2498
  if ( ! wp_verify_nonce( $nonce, 'mo-2factor-gobackto-registration-page-nonce' ) ) {
2499
  $error = new WP_Error();
@@ -2512,7 +2511,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2512
  $Mo2fdbQueries->update_user_details( $user->ID, array( 'mo_2factor_user_registration_status' => 'REGISTRATION_STARTED' ) );
2513
  }
2514
 
2515
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo2f_skip_feedback' ) {
2516
 
2517
  $nonce = $_POST['mo2f_skip_feedback_nonce'];
2518
 
@@ -2597,7 +2596,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2597
  }
2598
  }
2599
 
2600
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_2factor_resend_user_otp" ) { //resend OTP over email for additional admin and non-admin user
2601
 
2602
  $nonce = $_POST['mo_2factor_resend_user_otp_nonce'];
2603
 
@@ -2683,7 +2682,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2683
  $this->mo_auth_show_error_message();
2684
  }
2685
  }
2686
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo2f_mobile_authenticate_success' ) { // mobile registration for all users(common)
2687
 
2688
  $nonce = $_POST['mo2f_mobile_authenticate_success_nonce'];
2689
 
@@ -2706,7 +2705,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2706
  delete_user_meta( $user->ID, 'test_2FA' );
2707
  $this->mo_auth_show_success_message();
2708
  }
2709
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo2f_mobile_authenticate_error' ) { //mobile registration failed for all users(common)
2710
  $nonce = $_POST['mo2f_mobile_authenticate_error_nonce'];
2711
 
2712
  if ( ! wp_verify_nonce( $nonce, 'mo2f-mobile-authenticate-error-nonce' ) ) {
@@ -2720,12 +2719,12 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2720
  $this->mo_auth_show_error_message();
2721
  }
2722
 
2723
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_auth_setting_configuration" ) // redirect to setings page
2724
  {
2725
 
2726
  $Mo2fdbQueries->update_user_details( $user->ID, array( 'mo_2factor_user_registration_status' => 'MO_2_FACTOR_PLUGIN_SETTINGS' ) );
2727
 
2728
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == "mo_auth_refresh_mobile_qrcode" ) { // refrsh Qrcode for all users
2729
 
2730
  $nonce = $_POST['mo_auth_refresh_mobile_qrcode_nonce'];
2731
 
@@ -2830,7 +2829,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
2830
  $this->mo_auth_show_error_message();
2831
  }
2832
  }
2833
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo_2factor_backto_user_registration' ) { //back to registration page for additional admin and non-admin
2834
  $nonce = $_POST['mo_2factor_backto_user_registration_nonce'];
2835
 
2836
  if ( ! wp_verify_nonce( $nonce, 'mo-2factor-backto-user-registration-nonce' ) ) {
@@ -3030,7 +3029,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
3030
  }
3031
 
3032
 
3033
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo2f_out_of_band_error' ) { //push and out of band email denied
3034
  $nonce = $_POST['mo2f_out_of_band_error_nonce'];
3035
 
3036
  if ( ! wp_verify_nonce( $nonce, 'mo2f-out-of-band-error-nonce' ) ) {
@@ -3069,7 +3068,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
3069
  $this->mo_auth_show_success_message();
3070
 
3071
  }
3072
- }else if ( isset( $_POST['option'] ) and $_POST['option'] == 'mo2f_duo_authenticator_error' ) { //push and out of band email denied
3073
  $nonce = $_POST['mo2f_duo_authentcator_error_nonce'];
3074
 
3075
  if ( ! wp_verify_nonce( $nonce, 'mo2f-duo-authenticator-error-nonce' ) ) {
@@ -3575,23 +3574,17 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
3575
  'mo2f_chatid' => $chatID
3576
  );
3577
 
3578
- $handle = curl_init();
3579
-
3580
- curl_setopt_array($handle,
3581
- array(
3582
- CURLOPT_URL => $url,
3583
- CURLOPT_POST => true,
3584
- CURLOPT_POSTFIELDS => $postdata,
3585
- CURLOPT_RETURNTRANSFER => true,
3586
- CURLOPT_SSL_VERIFYHOST => FALSE,
3587
- CURLOPT_SSL_VERIFYPEER => FALSE,
3588
- )
3589
  );
3590
 
3591
- $data = curl_exec($handle);
3592
-
3593
-
3594
- curl_close($handle);
3595
  if($data == 'SUCCESS')
3596
  {
3597
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "OTP_SENT" ) . 'your telegram number.' . Mo2fConstants:: langTranslate( "ENTER_OTP" ) );
@@ -4280,22 +4273,17 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
4280
  'mo2f_chatid' => $chatID
4281
  );
4282
 
4283
- $handle = curl_init();
4284
-
4285
- curl_setopt_array($handle,
4286
- array(
4287
- CURLOPT_URL => $url,
4288
- CURLOPT_POST => true,
4289
- CURLOPT_POSTFIELDS => $postdata,
4290
- CURLOPT_RETURNTRANSFER => true,
4291
- CURLOPT_SSL_VERIFYHOST => FALSE,
4292
- CURLOPT_SSL_VERIFYPEER => FALSE,
4293
-
4294
- )
4295
  );
 
 
 
4296
 
4297
- $data = curl_exec($handle);
4298
- curl_close($handle);
4299
  if($data == 'SUCCESS')
4300
  {
4301
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "OTP_SENT" ) . 'your telegram number.' . Mo2fConstants:: langTranslate( "ENTER_OTP" ) );
@@ -4865,7 +4853,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
4865
  }
4866
 
4867
  function miniorange_email_verification_call( $current_user ) {
4868
- global $Mo2fdbQueries;
4869
  $email = $Mo2fdbQueries->get_user_detail( 'mo2f_user_email', $current_user->ID );
4870
 
4871
  if(MO2F_IS_ONPREM)
@@ -4906,7 +4894,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
4906
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
4907
  <tbody>
4908
  <td>
4909
- <td><img src="https://ci5.googleusercontent.com/proxy/10EQeM1udyBOkfD2dwxGhIaMXV4lOwCRtUecpsDkZISL0JIkOL2JhaYhVp54q6Sk656rW2rpAFJFEgGQiAOVcYIIKxXYMHHMNSNB=s0-d-e1-ft#https://login.xecurify.com/moas/images/xecurify-logo.png" style="color:#5fb336;text-decoration:none;display:block;width:auto;height:auto;max-height:35px" class="CToWUd"></td>
4910
  </tr>
4911
  </tbody>
4912
  </table>
@@ -4972,7 +4960,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
4972
  }
4973
  }
4974
  static function low_otp_alert( $auth_type) {
4975
- global $Mo2fdbQueries;
4976
  $email = get_option('mo2f_email')?get_option('mo2f_email'):get_option('admin_email');
4977
  if(MO2F_IS_ONPREM)
4978
  {
@@ -4998,7 +4986,7 @@ private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $foo
4998
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
4999
  <tbody>
5000
  <td>
5001
- <td><img src="https://ci5.googleusercontent.com/proxy/10EQeM1udyBOkfD2dwxGhIaMXV4lOwCRtUecpsDkZISL0JIkOL2JhaYhVp54q6Sk656rW2rpAFJFEgGQiAOVcYIIKxXYMHHMNSNB=s0-d-e1-ft#https://login.xecurify.com/moas/images/xecurify-logo.png" style="color:#5fb336;text-decoration:none;display:block;width:auto;height:auto;max-height:35px" class="CToWUd"></td>
5002
  </tr>
5003
  </tbody>
5004
  </table>
467
  */
468
 
469
  private function settings_error_page( $id = 'mo2f-setup-vue-site-settings', $footer = '' ) {
470
+
471
+ wp_register_script('mo2f_qr_code_js',plugins_url( "/includes/jquery-qrcode/jquery-qrcode.js", dirname(dirname(__FILE__ ))));
472
+ wp_register_script('mo2f_qr_code_minjs',plugins_url( "/includes/jquery-qrcode/jquery-qrcode.min.js", dirname(dirname(__FILE__ ))));
473
+ wp_register_script('mo2f_phone_js',plugins_url( "/includes/js/phone.js", dirname(dirname(__FILE__ ))));
474
+
475
+ wp_register_style('mo2f_phone_css',plugins_url('includes/css/phone.css', dirname(dirname(__FILE__))));
476
  $contact_url = 'https://wordpress.org/plugins/miniorange-2-factor-authentication/';
477
  echo '<head>';
478
+ wp_print_scripts( 'mo2f_qr_code_js' );
479
+ wp_print_scripts( 'mo2f_qr_code_minjs' );
480
+ wp_print_scripts( 'mo2f_phone_js' );
481
+ wp_print_styles( 'mo2f_phone_css' );
 
 
 
 
 
482
  echo '</head>';
483
 
 
484
  ?>
485
  <style type="text/css">
486
  #mo2f-setup-wizard-settings-area {
1874
  update_option('mo2f_encryption_key',$get_encryption_key);
1875
  }
1876
 
1877
+ if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_auth_deactivate_account" ) {
1878
  $nonce = $_POST['mo_auth_deactivate_account_nonce'];
1879
  if ( ! wp_verify_nonce( $nonce, 'mo-auth-deactivate-account-nonce' ) ) {
1880
  $error = new WP_Error();
1885
  $url = admin_url( 'plugins.php' );
1886
  wp_redirect( $url );
1887
  }
1888
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_auth_remove_account" ) {
1889
  $nonce = $_POST['mo_auth_remove_account_nonce'];
1890
  if ( ! wp_verify_nonce( $nonce, 'mo-auth-remove-account-nonce' ) ) {
1891
  $error = new WP_Error();
1895
  update_option( 'mo2f_register_with_another_email', 1 );
1896
  $this->mo_auth_deactivate();
1897
  }
1898
+ }else if(isset($_POST['option']) and sanitize_text_field($_POST['option']) == 'mo2f_skiplogin'){
1899
  $nonce = $_POST['mo2f_skiplogin_nonce'];
1900
  if ( ! wp_verify_nonce( $nonce, 'miniorange-2-factor-skiplogin-failed-nonce' ) ) {
1901
  $error = new WP_Error();
1904
  } else {
1905
  update_option('mo2f_tour_started',2);
1906
  }
1907
+ }else if(isset($_POST['option']) and sanitize_text_field($_POST['option']) == 'mo2f_userlogout'){
1908
  $nonce = $_POST['mo2f_userlogout_nonce'];
1909
  if ( ! wp_verify_nonce( $nonce, 'miniorange-2-factor-userlogout-failed-nonce' ) ) {
1910
  $error = new WP_Error();
1915
  wp_logout();
1916
  wp_redirect(admin_url());
1917
  }
1918
+ }else if(isset($_POST['option']) and sanitize_text_field($_POST['option']) == 'restart_plugin_tour'){
1919
  $nonce = $_POST['_wpnonce'];
1920
  if ( ! wp_verify_nonce( $nonce, 'restart_plugin_tour' ) ) {
1921
  $error = new WP_Error();
1960
  header("Location: ".$redirect);
1961
  return;
1962
  }
1963
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo2f_save_proxy_settings" ) {
1964
  $nonce = $_POST['mo2f_save_proxy_settings_nonce'];
1965
  if ( ! wp_verify_nonce( $nonce, 'mo2f-save-proxy-settings-nonce' ) ) {
1966
  $error = new WP_Error();
1980
  $this->mo_auth_show_success_message();
1981
  }
1982
 
1983
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_auth_register_customer" ) { //register the admin to miniOrange
1984
  //miniorange_register_customer_nonce
1985
  $nonce = $_POST['miniorange_register_customer_nonce'];
1986
  if ( ! wp_verify_nonce( $nonce, 'miniorange-register-customer-nonce' ) ) {
2049
  }
2050
  }
2051
  }
2052
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_auth_verify_customer" ) { //register the admin to miniOrange if already exist
2053
 
2054
  $nonce = $_POST['miniorange_verify_customer_nonce'];
2055
 
2180
 
2181
  delete_option( 'mo2f_password' );
2182
  }
2183
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo_2factor_phone_verification' ) { //at registration time
2184
  $phone = sanitize_text_field( $_POST['phone_number'] );
2185
  $Mo2fdbQueries->update_user_details( $user->ID, array( 'mo2f_user_phone' => $phone ) );
2186
 
2211
  $this->mo_auth_show_error_message();
2212
  }
2213
 
2214
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_2factor_resend_otp" ) { //resend OTP over email for admin
2215
 
2216
  $nonce = $_POST['mo_2factor_resend_otp_nonce'];
2217
 
2244
  }
2245
 
2246
 
2247
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo2f_dismiss_notice_option" ) {
2248
  update_option( 'mo2f_bug_fix_done', 1 );
2249
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_2factor_validate_otp" ) { //validate OTP over email for admin
2250
 
2251
  $nonce = $_POST['mo_2factor_validate_otp_nonce'];
2252
 
2290
  }
2291
  }
2292
  }
2293
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_2factor_validate_user_otp" ) { //validate OTP over email for additional admin
2294
 
2295
  //validation and sanitization
2296
  $nonce = $_POST['mo_2factor_validate_user_otp_nonce'];
2333
  }
2334
 
2335
  }
2336
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_2factor_send_query" ) { //Help me or support
2337
  $nonce = $_POST['mo_2factor_send_query_nonce'];
2338
 
2339
  if ( ! wp_verify_nonce( $nonce, 'mo-2factor-send-query-nonce' ) ) {
2374
  }
2375
  }
2376
 
2377
+ else if(isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'woocommerce_disable_login_prompt' ){
2378
  if(isset($_POST['woocommerce_login_prompt'])){
2379
  update_site_option('mo2f_woocommerce_login_prompt' , true);
2380
  }
2383
  }
2384
  }
2385
 
2386
+ else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo_auth_advanced_options_save' ) {
2387
  update_option( 'mo2f_message', 'Your settings are saved successfully.' );
2388
  $this->mo_auth_show_success_message();
2389
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo_auth_login_settings_save' ) {
2390
  $nonce = $_POST['mo_auth_login_settings_save_nonce'];
2391
  if ( ! wp_verify_nonce( $nonce, 'mo-auth-login-settings-save-nonce' ) ) {
2392
  $error = new WP_Error();
2438
  $this->mo_auth_show_error_message();
2439
  }
2440
  }
2441
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_auth_sync_sms_transactions" ) {
2442
  $customer = new Customer_Setup();
2443
  $content = json_decode( $customer->get_customer_transactions( get_option( 'mo2f_customerKey' ), get_option( 'mo2f_api_key' ),get_site_option('mo2f_license_type') ), true );
2444
  if ( ! array_key_exists( 'smsRemaining', $content ) ) {
2455
 
2456
  }
2457
 
2458
+ if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo2f_fix_database_error' ) {
2459
  $nonce = $_POST['mo2f_fix_database_error_nonce'];
2460
 
2461
  if ( ! wp_verify_nonce( $nonce, 'mo2f-fix-database-error-nonce' ) ) {
2469
  $Mo2fdbQueries->database_table_issue();
2470
 
2471
  }
2472
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo2f_registration_closed' ) {
2473
  $nonce = $_POST['mo2f_registration_closed_nonce'];
2474
  if ( ! wp_verify_nonce( $nonce, 'mo2f-registration-closed-nonce' ) ) {
2475
  $error = new WP_Error();
2481
  update_option( 'mo2f_message', $mo2f_message );
2482
  $this->mo_auth_show_success_message();
2483
  }
2484
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo2f_goto_verifycustomer" ) {
2485
  $nonce = $_POST['mo2f_goto_verifycustomer_nonce'];
2486
  if ( ! wp_verify_nonce( $nonce, 'mo2f-goto-verifycustomer-nonce' ) ) {
2487
  $error = new WP_Error();
2492
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "ENTER_YOUR_EMAIL_PASSWORD" ) );
2493
  update_option('mo_2factor_user_registration_status','MO_2_FACTOR_VERIFY_CUSTOMER');
2494
  }
2495
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo_2factor_gobackto_registration_page' ) { //back to registration page for admin
2496
  $nonce = $_POST['mo_2factor_gobackto_registration_page_nonce'];
2497
  if ( ! wp_verify_nonce( $nonce, 'mo-2factor-gobackto-registration-page-nonce' ) ) {
2498
  $error = new WP_Error();
2511
  $Mo2fdbQueries->update_user_details( $user->ID, array( 'mo_2factor_user_registration_status' => 'REGISTRATION_STARTED' ) );
2512
  }
2513
 
2514
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo2f_skip_feedback' ) {
2515
 
2516
  $nonce = $_POST['mo2f_skip_feedback_nonce'];
2517
 
2596
  }
2597
  }
2598
 
2599
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_2factor_resend_user_otp" ) { //resend OTP over email for additional admin and non-admin user
2600
 
2601
  $nonce = $_POST['mo_2factor_resend_user_otp_nonce'];
2602
 
2682
  $this->mo_auth_show_error_message();
2683
  }
2684
  }
2685
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo2f_mobile_authenticate_success' ) { // mobile registration for all users(common)
2686
 
2687
  $nonce = $_POST['mo2f_mobile_authenticate_success_nonce'];
2688
 
2705
  delete_user_meta( $user->ID, 'test_2FA' );
2706
  $this->mo_auth_show_success_message();
2707
  }
2708
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo2f_mobile_authenticate_error' ) { //mobile registration failed for all users(common)
2709
  $nonce = $_POST['mo2f_mobile_authenticate_error_nonce'];
2710
 
2711
  if ( ! wp_verify_nonce( $nonce, 'mo2f-mobile-authenticate-error-nonce' ) ) {
2719
  $this->mo_auth_show_error_message();
2720
  }
2721
 
2722
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_auth_setting_configuration" ) // redirect to setings page
2723
  {
2724
 
2725
  $Mo2fdbQueries->update_user_details( $user->ID, array( 'mo_2factor_user_registration_status' => 'MO_2_FACTOR_PLUGIN_SETTINGS' ) );
2726
 
2727
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == "mo_auth_refresh_mobile_qrcode" ) { // refrsh Qrcode for all users
2728
 
2729
  $nonce = $_POST['mo_auth_refresh_mobile_qrcode_nonce'];
2730
 
2829
  $this->mo_auth_show_error_message();
2830
  }
2831
  }
2832
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo_2factor_backto_user_registration' ) { //back to registration page for additional admin and non-admin
2833
  $nonce = $_POST['mo_2factor_backto_user_registration_nonce'];
2834
 
2835
  if ( ! wp_verify_nonce( $nonce, 'mo-2factor-backto-user-registration-nonce' ) ) {
3029
  }
3030
 
3031
 
3032
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo2f_out_of_band_error' ) { //push and out of band email denied
3033
  $nonce = $_POST['mo2f_out_of_band_error_nonce'];
3034
 
3035
  if ( ! wp_verify_nonce( $nonce, 'mo2f-out-of-band-error-nonce' ) ) {
3068
  $this->mo_auth_show_success_message();
3069
 
3070
  }
3071
+ }else if ( isset( $_POST['option'] ) and sanitize_text_field($_POST['option']) == 'mo2f_duo_authenticator_error' ) { //push and out of band email denied
3072
  $nonce = $_POST['mo2f_duo_authentcator_error_nonce'];
3073
 
3074
  if ( ! wp_verify_nonce( $nonce, 'mo2f-duo-authenticator-error-nonce' ) ) {
3574
  'mo2f_chatid' => $chatID
3575
  );
3576
 
3577
+ $args = array(
3578
+ 'method' => 'POST',
3579
+ 'timeout' => 10,
3580
+ 'sslverify' => false,
3581
+ 'headers' => array(),
3582
+ 'body' => $postdata,
 
 
 
 
 
3583
  );
3584
 
3585
+ $mo2f_api=new Mo2f_Api();
3586
+ $data=$mo2f_api->mo2f_wp_remote_post($url,$args);
3587
+
 
3588
  if($data == 'SUCCESS')
3589
  {
3590
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "OTP_SENT" ) . 'your telegram number.' . Mo2fConstants:: langTranslate( "ENTER_OTP" ) );
4273
  'mo2f_chatid' => $chatID
4274
  );
4275
 
4276
+ $args = array(
4277
+ 'method' => 'POST',
4278
+ 'timeout' => 10,
4279
+ 'sslverify' => false,
4280
+ 'headers' => array(),
4281
+ 'body' => $postdata,
 
 
 
 
 
 
4282
  );
4283
+
4284
+ $mo2f_api=new Mo2f_Api();
4285
+ $data=$mo2f_api->mo2f_wp_remote_post($url,$args);
4286
 
 
 
4287
  if($data == 'SUCCESS')
4288
  {
4289
  update_option( 'mo2f_message', Mo2fConstants:: langTranslate( "OTP_SENT" ) . 'your telegram number.' . Mo2fConstants:: langTranslate( "ENTER_OTP" ) );
4853
  }
4854
 
4855
  function miniorange_email_verification_call( $current_user ) {
4856
+ global $Mo2fdbQueries,$imagePath;
4857
  $email = $Mo2fdbQueries->get_user_detail( 'mo2f_user_email', $current_user->ID );
4858
 
4859
  if(MO2F_IS_ONPREM)
4894
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
4895
  <tbody>
4896
  <td>
4897
+ <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>
4898
  </tr>
4899
  </tbody>
4900
  </table>
4960
  }
4961
  }
4962
  static function low_otp_alert( $auth_type) {
4963
+ global $Mo2fdbQueries,$imagePath;
4964
  $email = get_option('mo2f_email')?get_option('mo2f_email'):get_option('admin_email');
4965
  if(MO2F_IS_ONPREM)
4966
  {
4986
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
4987
  <tbody>
4988
  <td>
4989
+ <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>
4990
  </tr>
4991
  </tbody>
4992
  </table>
handler/twofa/two_fa_utility.php CHANGED
@@ -632,6 +632,7 @@ class MO2f_Utility {
632
  }
633
 
634
  public static function get_codes_email_content($codes){
 
635
  $message = '<table cellpadding="25" style="margin:0px auto">
636
  <tbody>
637
  <tr>
@@ -639,7 +640,7 @@ class MO2f_Utility {
639
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
640
  <tbody>
641
  <tr>
642
- <td><img src="https://ci5.googleusercontent.com/proxy/10EQeM1udyBOkfD2dwxGhIaMXV4lOwCRtUecpsDkZISL0JIkOL2JhaYhVp54q6Sk656rW2rpAFJFEgGQiAOVcYIIKxXYMHHMNSNB=s0-d-e1-ft#https://login.xecurify.com/moas/images/xecurify-logo.png" style="color:#5fb336;text-decoration:none;display:block;width:auto;height:auto;max-height:35px" class="CToWUd"></td>
643
  </tr>
644
  </tbody>
645
  </table>
@@ -673,6 +674,7 @@ class MO2f_Utility {
673
  }
674
 
675
  public static function get_codes_warning_email_content($codes_remaining){
 
676
  $message = '<table cellpadding="25" style="margin:0px auto">
677
  <tbody>
678
  <tr>
@@ -680,7 +682,7 @@ class MO2f_Utility {
680
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
681
  <tbody>
682
  <tr>
683
- <td><img src="https://ci5.googleusercontent.com/proxy/10EQeM1udyBOkfD2dwxGhIaMXV4lOwCRtUecpsDkZISL0JIkOL2JhaYhVp54q6Sk656rW2rpAFJFEgGQiAOVcYIIKxXYMHHMNSNB=s0-d-e1-ft#https://login.xecurify.com/moas/images/xecurify-logo.png" style="color:#5fb336;text-decoration:none;display:block;width:auto;height:auto;max-height:35px" class="CToWUd"></td>
684
  </tr>
685
  </tbody>
686
  </table>
632
  }
633
 
634
  public static function get_codes_email_content($codes){
635
+ global $imagePath;
636
  $message = '<table cellpadding="25" style="margin:0px auto">
637
  <tbody>
638
  <tr>
640
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
641
  <tbody>
642
  <tr>
643
+ <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>
644
  </tr>
645
  </tbody>
646
  </table>
674
  }
675
 
676
  public static function get_codes_warning_email_content($codes_remaining){
677
+ global $imagePath;
678
  $message = '<table cellpadding="25" style="margin:0px auto">
679
  <tbody>
680
  <tr>
682
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
683
  <tbody>
684
  <tr>
685
+ <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>
686
  </tr>
687
  </tbody>
688
  </table>
handler/user-profile-2fa-update.php CHANGED
@@ -6,10 +6,10 @@ else
6
  global $Mo2fdbQueries;
7
  $email = $Mo2fdbQueries->get_user_detail('mo2f_user_email',$user);
8
  $method = MO2f_Utility::mo2f_decode_2_factor($method,'wpdb');
9
- $email = ($email=='')?filter_var($_POST['email'], FILTER_SANITIZE_EMAIL):$email;
10
  $enduser = new Two_Factor_Setup();
11
  if(isset($_POST['verify_phone']))
12
- $phone = strlen($_POST['verify_phone']>4)?sanitize_text_field($_POST['verify_phone']):null;
13
  else
14
  $phone = null;
15
  $response = json_decode( $enduser->mo2f_update_userinfo( $email,MO2f_Utility::mo2f_decode_2_factor($method,'server') , $phone, null, null ), true );
@@ -23,7 +23,7 @@ switch ($method) {
23
  case "miniOrange Soft Token":
24
  if($id != $user){
25
  send_reconfiguration_on_email($email,$user,$method);
26
- }else if($_POST['mo2f_configuration_status']!='SUCCESS')
27
  return;
28
  delete_user_meta( $user, 'configure_2FA' );
29
  update_user_meta($user,'mo2f_2FA_method_to_configure',$method);
@@ -41,7 +41,7 @@ switch ($method) {
41
  case "Google Authenticator":
42
  if($id!= $user){
43
  send_reconfiguration_on_email($email,$user,$method);
44
- }else if($_POST['mo2f_configuration_status']!='SUCCESS')
45
  return;
46
  $Mo2fdbQueries->update_user_details( $user, array(
47
  'mo2f_GoogleAuthenticator_config_status' => true,
@@ -59,7 +59,7 @@ switch ($method) {
59
  case "Authy Authenticator":
60
  if($id!= $user){
61
  send_reconfiguration_on_email($email,$user,$method);
62
- }else if($_POST['mo2f_configuration_status']!='SUCCESS')
63
  return;
64
  $Mo2fdbQueries->update_user_details( $user, array(
65
  'mo2f_GoogleAuthenticator_config_status' => false,
@@ -155,7 +155,7 @@ switch ($method) {
155
  if(isset($_POST['mo2fa_count']) && sanitize_text_field($_POST['mo2fa_count']) != '1')
156
  update_option('mo2fa_userProfile_method',$method);
157
  function send_reconfiguration_on_email($email,$user,$method){
158
- global $mo2f_dirName;
159
  $method = MO2f_Utility::mo2f_decode_2_factor($method,'server');
160
  $reconfiguraion_method = hash('sha512',$method);
161
  update_site_option($reconfiguraion_method,$method);
@@ -176,7 +176,7 @@ function send_reconfiguration_on_email($email,$user,$method){
176
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
177
  <tbody>
178
  <tr>
179
- <td><img src="https://ci5.googleusercontent.com/proxy/10EQeM1udyBOkfD2dwxGhIaMXV4lOwCRtUecpsDkZISL0JIkOL2JhaYhVp54q6Sk656rW2rpAFJFEgGQiAOVcYIIKxXYMHHMNSNB=s0-d-e1-ft#https://login.xecurify.com/moas/images/xecurify-logo.png" style="color:#5fb336;text-decoration:none;display:block;width:auto;height:auto;max-height:35px" class="CToWUd"></td>
180
  </tr>
181
  </tbody>
182
  </table>
@@ -184,11 +184,11 @@ function send_reconfiguration_on_email($email,$user,$method){
184
  <tbody>
185
  <tr>
186
  <td>
187
- <input type="hidden" name="user_id" id="user_id" value="'.$user_id.'">
188
- <input type="hidden" name="email" id="email" value="'.$email.'">
189
  <p style="margin-top:0;margin-bottom:20px">Dear Customer,</p>
190
  <p style="margin-top:0;margin-bottom:10px">Please scan the QR code from given link to set <b>2FA method</b>:</p>
191
- <p><a href="'.$path.'" > Click to reconfigure 2nd factor</a></p>
192
  <p style="margin-top:0;margin-bottom:15px">Thank you,<br>miniOrange Team</p>
193
  <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>
194
  </div></div></td>
@@ -201,7 +201,7 @@ function send_reconfiguration_on_email($email,$user,$method){
201
  </table>';
202
  $result = wp_mail($email,$subject,$message,$headers);
203
  if($result){
204
- update_site_option( 'mo2f_message', 'A OTP has been sent to you on' .'<b> ' . $email . '</b>. ' . Mo2fConstants::langTranslate("ACCEPT_LINK_TO_VERIFY_EMAIL"));
205
  $arr = array('status' => 'SUCCESS','message'=>'Successfully validated.' ,'txId' => '' );
206
 
207
  }else{
6
  global $Mo2fdbQueries;
7
  $email = $Mo2fdbQueries->get_user_detail('mo2f_user_email',$user);
8
  $method = MO2f_Utility::mo2f_decode_2_factor($method,'wpdb');
9
+ $email = sanitize_email($email);
10
  $enduser = new Two_Factor_Setup();
11
  if(isset($_POST['verify_phone']))
12
+ $phone = strlen($_POST['verify_phone']>4)?sanitize_text_field($_POST['verify_phone']) : null;
13
  else
14
  $phone = null;
15
  $response = json_decode( $enduser->mo2f_update_userinfo( $email,MO2f_Utility::mo2f_decode_2_factor($method,'server') , $phone, null, null ), true );
23
  case "miniOrange Soft Token":
24
  if($id != $user){
25
  send_reconfiguration_on_email($email,$user,$method);
26
+ }else if(sanitize_text_field($_POST['mo2f_configuration_status'])!='SUCCESS')
27
  return;
28
  delete_user_meta( $user, 'configure_2FA' );
29
  update_user_meta($user,'mo2f_2FA_method_to_configure',$method);
41
  case "Google Authenticator":
42
  if($id!= $user){
43
  send_reconfiguration_on_email($email,$user,$method);
44
+ }else if(sanitize_text_field($_POST['mo2f_configuration_status'])!='SUCCESS')
45
  return;
46
  $Mo2fdbQueries->update_user_details( $user, array(
47
  'mo2f_GoogleAuthenticator_config_status' => true,
59
  case "Authy Authenticator":
60
  if($id!= $user){
61
  send_reconfiguration_on_email($email,$user,$method);
62
+ }else if(sanitize_text_field($_POST['mo2f_configuration_status'])!='SUCCESS')
63
  return;
64
  $Mo2fdbQueries->update_user_details( $user, array(
65
  'mo2f_GoogleAuthenticator_config_status' => false,
155
  if(isset($_POST['mo2fa_count']) && sanitize_text_field($_POST['mo2fa_count']) != '1')
156
  update_option('mo2fa_userProfile_method',$method);
157
  function send_reconfiguration_on_email($email,$user,$method){
158
+ global $mo2f_dirName,$imagePath;
159
  $method = MO2f_Utility::mo2f_decode_2_factor($method,'server');
160
  $reconfiguraion_method = hash('sha512',$method);
161
  update_site_option($reconfiguraion_method,$method);
176
  <table cellpadding="24" width="584px" style="margin:0 auto;max-width:584px;background-color:#f6f4f4;border:1px solid #a8adad">
177
  <tbody>
178
  <tr>
179
+ <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>
180
  </tr>
181
  </tbody>
182
  </table>
184
  <tbody>
185
  <tr>
186
  <td>
187
+ <input type="hidden" name="user_id" id="user_id" value="'.esc_attr($user_id).'">
188
+ <input type="hidden" name="email" id="email" value="'.esc_attr($email).'">
189
  <p style="margin-top:0;margin-bottom:20px">Dear Customer,</p>
190
  <p style="margin-top:0;margin-bottom:10px">Please scan the QR code from given link to set <b>2FA method</b>:</p>
191
+ <p><a href="'.esc_url($path).'" > Click to reconfigure 2nd factor</a></p>
192
  <p style="margin-top:0;margin-bottom:15px">Thank you,<br>miniOrange Team</p>
193
  <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>
194
  </div></div></td>
201
  </table>';
202
  $result = wp_mail($email,$subject,$message,$headers);
203
  if($result){
204
+ update_site_option( 'mo2f_message', 'A OTP has been sent to you on' .'<b> ' . esc_html($email) . '</b>. ' . Mo2fConstants::langTranslate("ACCEPT_LINK_TO_VERIFY_EMAIL"));
205
  $arr = array('status' => 'SUCCESS','message'=>'Successfully validated.' ,'txId' => '' );
206
 
207
  }else{
helper/constants.php CHANGED
@@ -51,7 +51,6 @@
51
  const OnPremiseLockedOut ='https://faq.miniorange.com/knowledgebase/i-am-locked-cant-access-my-account-what-do-i-do/';
52
  const rechargeLink = MoWpnsConstants::HOST_NAME.'/moas/login?redirectUrl='.MoWpnsConstants::HOST_NAME.'/moas/initializepayment&requestOrigin=otp_recharge_plan';
53
 
54
-
55
  public static $repo_status_code = array(-96 => 'Maximum execution time exceeded while downloading files from repository. Please contact miniOrange.', -97 => '<i>Uploads Folder</i> permission denied', -98 => '2 Factor authentication plugin unable to reach wordpress repository files. Please contact miniOrange.', -99 => 'Unable to download Wordpress, plugins and themes from Repository', -100 => 'Unable to unzip the Wordpress, plugins and themes');
56
 
57
  public static $host = 'http://scanner.api.xecurify.com/malwareservice/rest/file/upload';
51
  const OnPremiseLockedOut ='https://faq.miniorange.com/knowledgebase/i-am-locked-cant-access-my-account-what-do-i-do/';
52
  const rechargeLink = MoWpnsConstants::HOST_NAME.'/moas/login?redirectUrl='.MoWpnsConstants::HOST_NAME.'/moas/initializepayment&requestOrigin=otp_recharge_plan';
53
 
 
54
  public static $repo_status_code = array(-96 => 'Maximum execution time exceeded while downloading files from repository. Please contact miniOrange.', -97 => '<i>Uploads Folder</i> permission denied', -98 => '2 Factor authentication plugin unable to reach wordpress repository files. Please contact miniOrange.', -99 => 'Unable to download Wordpress, plugins and themes from Repository', -100 => 'Unable to unzip the Wordpress, plugins and themes');
55
 
56
  public static $host = 'http://scanner.api.xecurify.com/malwareservice/rest/file/upload';
helper/curl.php CHANGED
@@ -256,6 +256,7 @@ class MocURL
256
  $field_string = json_encode($fields);
257
  $authHeader = $this->createAuthHeader($customerKey,$apiKey);
258
  $response = self::callAPI($url, $field_string,$authHeader);
 
259
  return $response;
260
 
261
  }
@@ -268,43 +269,33 @@ class MocURL
268
  $stringToHash = $customerKey . $currentTimestampInMillis . $apiKey;
269
  $authHeader = hash("sha512", $stringToHash);
270
 
271
- $header = array (
272
- "Content-Type: application/json",
273
- "Customer-Key: $customerKey",
274
- "Timestamp: $currentTimestampInMillis",
275
- "Authorization: $authHeader"
276
- );
277
- return $header;
278
  }
279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
 
281
- private static function callAPI($url, $json_string, $headers = array("Content-Type: application/json")) {
282
- //For testing (0, false)
283
- //For Production (2, true)
284
-
285
- $sslhost=2;
286
- $sslpeer=false;
287
-
288
- $ch = curl_init($url);
289
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
290
- curl_setopt($ch, CURLOPT_ENCODING, "");
291
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
292
- curl_setopt($ch, CURLOPT_AUTOREFERER, true);
293
- curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, $sslhost );
294
-
295
- curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, $sslpeer );
296
- curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
297
- if(!is_null($headers)) curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
298
- curl_setopt($ch, CURLOPT_POST, true);
299
- curl_setopt($ch, CURLOPT_POSTFIELDS, $json_string);
300
- $content = curl_exec($ch);
301
-
302
- if (curl_errno($ch)) {
303
- echo 'Request Error:' . curl_error($ch);
304
- exit();
305
- }
306
-
307
- curl_close($ch);
308
- return $content;
309
  }
310
- }
256
  $field_string = json_encode($fields);
257
  $authHeader = $this->createAuthHeader($customerKey,$apiKey);
258
  $response = self::callAPI($url, $field_string,$authHeader);
259
+
260
  return $response;
261
 
262
  }
269
  $stringToHash = $customerKey . $currentTimestampInMillis . $apiKey;
270
  $authHeader = hash("sha512", $stringToHash);
271
 
272
+ $header = [
273
+ "Content-Type" => "application/json",
274
+ "Customer-Key" => $customerKey,
275
+ "Timestamp" => $currentTimestampInMillis,
276
+ "Authorization" => $authHeader
277
+ ];
278
+ return $header;
279
  }
280
 
281
+ private static function callAPI($url, $json_string, $http_header_array =array("Content-Type"=>"application/json","charset"=>"UTF-8","Authorization"=>"Basic")) {
282
+ //For testing (0, false)
283
+ //For Production (1, true)
284
+
285
+ $args = array(
286
+ 'method' => 'POST',
287
+ 'body' => $json_string,
288
+ 'timeout' => '5',
289
+ 'redirection' => '5',
290
+ 'sslverify' =>true,
291
+ 'httpversion' => '1.0',
292
+ 'blocking' => true,
293
+ 'headers' => $http_header_array
294
+ );
295
+
296
+ $mo2f_api=new Mo2f_Api();
297
+ $response=$mo2f_api->mo2f_wp_remote_post($url,$args);
298
+ return $response;
299
+ }
300
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  }
 
helper/dashboard_security_notification.php CHANGED
@@ -95,12 +95,12 @@ class miniorange_security_notification{
95
  echo '<table style="solid #CCCCCC; border-collapse: collapse; padding:0px 0px 0px 10px; margin:2px; width:99%">
96
  <tr>
97
  <td style="font-size:18px;color:#ffffff;padding: 10px;"><strong style="font-weight:300;">Remaining SMS transactions </strong></td>
98
- <td style="text-align:center;font-size:36px;color:#ffffff;font-weight:400" ><strong>'.$SMSTransactions.'</strong></td>
99
 
100
  </tr>
101
  <tr>
102
  <td style="font-size:18px;color:#ffffff;padding: 10px;"><strong style="font-weight:300;">Remaining Email transactions </strong></td>
103
- <td style="text-align:center;font-size:36px;color:#ffffff;font-weight:400" ><strong>'.$EmailTransactions.'</strong></td>
104
 
105
 
106
  </tr>
@@ -135,11 +135,11 @@ class miniorange_security_notification{
135
 
136
 
137
  <tr>
138
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400' ><strong>".$last_scan_malicious_count[0]->total."</strong></td>
139
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>".$total_malicious_count[0]->total."</strong></td>
140
 
141
 
142
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>".$total_scanned_files."</strong></td>
143
 
144
 
145
  </tr>
@@ -179,9 +179,9 @@ class miniorange_security_notification{
179
  <table dir='ltr' style='table-layout:fixed;margin:10px 0 20px 0;padding:0;vertical-align:top;width:100%'>
180
  <tbody>
181
  <tr>
182
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400' ><strong>".$failed_transaction."</strong></td>
183
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>".$weakPass."</strong></td>
184
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>".$fake_domains."</strong></td>
185
 
186
 
187
  </tr>
@@ -225,10 +225,10 @@ class miniorange_security_notification{
225
  <table dir='ltr' style='table-layout:fixed;margin:10px 0 20px 0;padding:0;vertical-align:top;width:100%'>
226
  <tbody>
227
  <tr>
228
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400' ><strong>".$array['plugin_count']."</strong></td>
229
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>".$array['themes_count']."</strong></td>
230
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>".$array['wp_files_count']."</strong></td>
231
- <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>".$array['db_count']."</strong></td>
232
 
233
  </tr>
234
 
95
  echo '<table style="solid #CCCCCC; border-collapse: collapse; padding:0px 0px 0px 10px; margin:2px; width:99%">
96
  <tr>
97
  <td style="font-size:18px;color:#ffffff;padding: 10px;"><strong style="font-weight:300;">Remaining SMS transactions </strong></td>
98
+ <td style="text-align:center;font-size:36px;color:#ffffff;font-weight:400" ><strong>'.esc_html($SMSTransactions).'</strong></td>
99
 
100
  </tr>
101
  <tr>
102
  <td style="font-size:18px;color:#ffffff;padding: 10px;"><strong style="font-weight:300;">Remaining Email transactions </strong></td>
103
+ <td style="text-align:center;font-size:36px;color:#ffffff;font-weight:400" ><strong>'.esc_html($EmailTransactions).'</strong></td>
104
 
105
 
106
  </tr>
135
 
136
 
137
  <tr>
138
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400' ><strong>".esc_html($last_scan_malicious_count[0]->total)."</strong></td>
139
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>".esc_html($total_malicious_count[0]->total)."</strong></td>
140
 
141
 
142
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>".esc_html($total_scanned_files)."</strong></td>
143
 
144
 
145
  </tr>
179
  <table dir='ltr' style='table-layout:fixed;margin:10px 0 20px 0;padding:0;vertical-align:top;width:100%'>
180
  <tbody>
181
  <tr>
182
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400' ><strong>" .esc_html($failed_transaction)."</strong></td>
183
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>" .esc_html($weakPass)."</strong></td>
184
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>" .esc_html($fake_domains)."</strong></td>
185
 
186
 
187
  </tr>
225
  <table dir='ltr' style='table-layout:fixed;margin:10px 0 20px 0;padding:0;vertical-align:top;width:100%'>
226
  <tbody>
227
  <tr>
228
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400' ><strong>" .esc_html($array['plugin_count'])."</strong></td>
229
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>" .esc_html($array['themes_count'])."</strong></td>
230
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>" .esc_html($array['wp_files_count'])."</strong></td>
231
+ <td style='text-align:center;font-size:36px;color:#ffffff;font-weight:400'><strong>" .esc_html($array['db_count'])."</strong></td>
232
 
233
  </tr>
234
 
helper/pluginUtility.php CHANGED
@@ -472,7 +472,11 @@ class MoWpnsHandler
472
  $countrycodes = get_option('mo_wpns_countrycodes');
473
 
474
  if($countrycodes && !empty($countrycodes)){
475
- $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$userIp));
 
 
 
 
476
  if($ip_data && $ip_data->geoplugin_countryName != null){
477
  $country_code = $ip_data->geoplugin_countryCode;
478
  if(!empty($country_code)){
472
  $countrycodes = get_option('mo_wpns_countrycodes');
473
 
474
  if($countrycodes && !empty($countrycodes)){
475
+ $ip_data=wp_remote_get("http://www.geoplugin.net/json.gp?ip=".$userIp);
476
+
477
+ if( !is_wp_error( $ip_data ) ) {
478
+ $ip_data=wp_remote_retrieve_body( $ip_data);
479
+ }
480
  if($ip_data && $ip_data->geoplugin_countryName != null){
481
  $country_code = $ip_data->geoplugin_countryCode;
482
  if(!empty($country_code)){
includes/css/style_settings.css CHANGED
@@ -4022,6 +4022,26 @@ input:checked + .slider:before {
4022
  padding: 5px;
4023
  }
4024
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4025
  @media screen and (max-width: 600px) {
4026
  .mo2f-header {
4027
  flex-direction: column;
4022
  padding: 5px;
4023
  }
4024
 
4025
+ .mo2f_test_captcha_button {
4026
+ height: 30px;
4027
+ line-height: 28px;
4028
+ padding: 0 12px 2px;
4029
+ background: #0085ba;
4030
+ border-color: #0073aa #006799 #006799;
4031
+ -webkit-box-shadow: 0 1px 0 #006799;
4032
+ box-shadow: 0 1px 0 #006799;
4033
+ color: #fff;
4034
+ text-decoration: none;
4035
+ text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799,
4036
+ -1px 0 1px #006799;
4037
+ border-radius: 3px;
4038
+ cursor: pointer;
4039
+ border-width: 1px;
4040
+ border-style: solid;
4041
+ font-size: 15px;
4042
+ width: 300px;
4043
+ }
4044
+
4045
  @media screen and (max-width: 600px) {
4046
  .mo2f-header {
4047
  flex-direction: column;
includes/css/upgrade.css CHANGED
@@ -1,342 +1,343 @@
1
- .mo2fa_pricing_head_blue{
2
- background-color: #1f3668;
3
- border-radius: 1em 1em 50% 50%;
4
- padding: 1em 1em 2em 0em;
5
- color: white;
6
- margin-top: -10%;
7
  }
8
  .mo2fa_per_tooltip_methodlist {
9
- position: relative;
10
- display: inline-block;
11
  }
12
  .mo2fa_per_tooltip_methodlist .mo2fa_methodlist {
13
- visibility: hidden;
14
- width: 13em;
15
- background-color: #000000b8;
16
- color: #fff;
17
- text-align: left;
18
- border-radius: 6px;
19
- padding: 12px 2px 12px 28px;
20
- position: absolute;
21
- z-index: 1;
22
- top: -2em;
23
- left: 107%;
24
  }
25
  .mo2fa_per_tooltip_methodlist:hover .mo2fa_methodlist {
26
- visibility: visible;
27
- }
28
  .mo2fa_per_tooltip_methodlist .mo2fa_methodlist::after {
29
- content: "";
30
- position: absolute;
31
- top: 50%;
32
- right: 100%;
33
- margin-top: -5px;
34
- border-width: 5px;
35
- border-style: solid;
36
- border-color: transparent black transparent transparent;
37
- }
38
  .mo2fa_on_per_tooltip_methodlist {
39
- position: relative;
40
- display: inline-block;
41
  }
42
  .mo2fa_on_per_tooltip_methodlist .mo2fa_methodlist {
43
- visibility: hidden;
44
- width: 14em;
45
- background-color: #000000b8;
46
- color: #fff;
47
- text-align: left;
48
- border-radius: 6px;
49
- padding: 12px 2px 12px 28px;
50
- position: absolute;
51
- z-index: 1;
52
- top: -1.6em;
53
- left: 90%;
54
  }
55
  .mo2fa_on_per_tooltip_methodlist:hover .mo2fa_methodlist {
56
- visibility: visible;
57
- }
58
  .mo2fa_on_per_tooltip_methodlist .mo2fa_methodlist::after {
59
- content: "";
60
- position: absolute;
61
- top: 50%;
62
- right: 100%;
63
- margin-top: -5px;
64
- border-width: 5px;
65
- border-style: solid;
66
- border-color: transparent black transparent transparent;
67
- }
68
-
69
 
70
  .mo2fa_cloud_per_tooltip_methodlist {
71
- position: relative;
72
- display: inline-block;
73
  }
74
  .mo2fa_cloud_per_tooltip_methodlist .mo2fa_methodlist {
75
- visibility: hidden;
76
- width: 14em;
77
- background-color: #000000b8;
78
- color: #fff;
79
- text-align: left;
80
- border-radius: 6px;
81
- padding: 11px 1px 11px 43px;
82
- position: absolute;
83
- z-index: 1;
84
- top: -15px;
85
- right: 110%;
86
  }
87
  .mo2fa_cloud_per_tooltip_methodlist:hover .mo2fa_methodlist {
88
- visibility: visible;
89
- }
90
  .mo2fa_cloud_per_tooltip_methodlist .mo2fa_methodlist::after {
91
- content: "";
92
- position: absolute;
93
- top: 50%;
94
- left: 100%;
95
- margin-top: -5px;
96
- border-width: 5px;
97
- border-style: solid;
98
- border-color: transparent transparent transparent black;
99
- }
100
 
101
  .mo2fa_fido_tooltip_methodlist {
102
- position: relative;
103
- display: inline-block;
104
  }
105
  .mo2fa_fido_tooltip_methodlist .mo2fa_methodlist {
106
- visibility: hidden;
107
- width: 16em;
108
- background-color: #000000b8;
109
- color: #fff;
110
- text-align: left;
111
- border-radius: 6px;
112
- padding: 12px 2px 12px 28px;
113
- position: absolute;
114
- z-index: 1;
115
- top: -1.9em;
116
- left: 91%;
117
  }
118
  .mo2fa_fido_tooltip_methodlist:hover .mo2fa_methodlist {
119
- visibility: visible;
120
- }
121
  .mo2fa_fido_tooltip_methodlist .mo2fa_methodlist::after {
122
- content: "";
123
- position: absolute;
124
- top: 50%;
125
- right: 100%;
126
- margin-top: -5px;
127
- border-width: 5px;
128
- border-style: solid;
129
- border-color: transparent black transparent transparent;
130
- }
131
 
132
  .mo2fa_shortcode_tooltip_methodlist {
133
- position: relative;
134
- display: inline-block;
135
  }
136
  .mo2fa_shortcode_tooltip_methodlist .mo2fa_methodlist {
137
- visibility: hidden;
138
- width: auto;
139
- min-width:26em;
140
- background-color: #000000b8;
141
- color: #fff;
142
- text-align: left;
143
- border-radius: 6px;
144
- padding: 7px 0px 8px 8px;
145
- position: absolute;
146
- z-index: 1;
147
- top: -1.1em;
148
- left: 107%;
149
  }
150
  .mo2fa_shortcode_tooltip_methodlist:hover .mo2fa_methodlist {
151
- visibility: visible;
152
- }
153
  .mo2fa_shortcode_tooltip_methodlist .mo2fa_methodlist::after {
154
- content: "";
155
- position: absolute;
156
- top: 50%;
157
- right: 100%;
158
- margin-top: -5px;
159
- border-width: 5px;
160
- border-style: solid;
161
- border-color: transparent black transparent transparent;
162
- }
163
- .mo2fa_shortcode_ent_tooltip_methodlist {
164
- position: relative;
165
- display: inline-block;
166
  }
167
  .mo2fa_shortcode_ent_tooltip_methodlist .mo2fa_methodlist {
168
- visibility: hidden;
169
- width: auto;
170
- min-width:26em;
171
- background-color: #000000b8;
172
- color: #fff;
173
- text-align: left;
174
- border-radius: 6px;
175
- padding: 7px 0px 8px 8px;
176
- position: absolute;
177
- z-index: 1;
178
- top: -15px;
179
- right: 110%;
180
  }
181
  .mo2fa_shortcode_ent_tooltip_methodlist:hover .mo2fa_methodlist {
182
- visibility: visible;
183
- }
184
  .mo2fa_shortcode_ent_tooltip_methodlist .mo2fa_methodlist::after {
185
- content: "";
186
- position: absolute;
187
- top: 50%;
188
- left: 100%;
189
- margin-top: -5px;
190
- border-width: 5px;
191
- border-style: solid;
192
- border-color: transparent transparent transparent black;
193
- }
194
- #mo2f_upgrade_main_div:hover > #mo2fa-ribbon{
195
- margin-top: 0%;
196
- transition: 1s;
197
  }
198
- .mo2fa_per_year{
199
- color:white;
200
- font-size: small;
201
  }
202
  .mo2fa_tooltip {
203
- position: relative;
204
- border-bottom: 1px dotted black;
205
  }
206
  .mo2fa_tooltip .mo2fa_tooltiptext {
207
- visibility: hidden;
208
- line-height: 1.6;
209
- width: 248px;
210
- background-color: white;
211
- color: cadetblue;
212
- border: 1px solid cadetblue;
213
- text-align: center;
214
- border-radius: 6px;
215
- padding: 10px 0;
216
- position: absolute;
217
- z-index: 1;
218
- top: -5px;
219
- left: 105%;
 
220
  }
221
  .mo2fa_tooltip:hover .mo2fa_tooltiptext {
222
- visibility: visible;
223
- }
224
  .mo2fa-ribbon span {
225
- position: absolute;
226
- width: 154px;
227
- padding: 19px 0px 15px 68px;
228
- background-color: #3498db;
229
- box-shadow: 0 5px 10px rgb(0 0 0 / 10%);
230
- color: #fff;
231
- font: 700 14px/1 Lato,sans-serif;
232
- text-shadow: 0 1px 1px rgb(0 0 0 / 20%);
233
  }
234
  .mo2fa-ribbon-top-right span {
235
- left: 0;
236
- top: 19px;
237
- transform: rotate(45deg);
238
- z-index: 1;
239
  }
240
  .mo2fa-ribbon {
241
- width: 160px;
242
- height: 160px;
243
- overflow: hidden;
244
- position: absolute;
245
- z-index: 0;
246
  }
247
  .mo2fa-ribbon-top-right {
248
- top: 154px;
249
- right: 486px;
250
  }
251
  .mo2fa-ribbon::before {
252
- position: absolute;
253
- content: "";
254
- border: 5px solid #2980b9;
255
  }
256
  .mo2fa-ribbon-top-right::before {
257
- top: -2px;
258
- left: 34px;
259
  }
260
- .mo2fa-ribbon::after, .mo2fa-ribbon::before {
261
- position: absolute;
262
- content: "";
263
- border: 5px solid #2980b9;
 
264
  }
265
  .mo2fa-ribbon-top-right::after {
266
- bottom: 34px;
267
- right: 0;
268
  }
269
- .mo2fa_pricing_head_sky{
270
- background-color: #327a86;
271
- border-radius: 1em 1em 50% 50%;
272
- padding: 1em 1em 2em 0em;
273
- color: white;
274
- margin-top: -10%;
275
- height:15.5em;
276
  }
277
- .wp-core-ui select{
278
- padding: 4px 24px 4px 8px;
279
- margin-left:1em;
280
  }
281
- .mo2fa_plan-type{
282
- text-align: center;
283
- color: #1f3668;
284
- font-size: 28px;
285
  }
286
- .mo2fa_ul li{
287
- margin-bottom: 0%;
288
  }
289
- .mo2fa_pricing_feature_collection_supporter{
290
- height: 32em;
291
  }
292
- .mo2fa_pricing_head_supporter{
293
- height: 4em;
294
- padding: 2px 1px 1px 1px;
295
- margin-bottom: 1em;
296
  }
297
  i.fa-check {
298
- color: black;
299
- margin-left:2em;
300
- margin-right: 17px;
301
- margin-top: 0.5em;
302
- margin-bottom: 0.5em;
303
  }
304
  i.fa-times {
305
- color: #b6abab;
306
- margin-left: 2em;
307
- margin-right: 17px;
308
- margin-top: 0.5em;
309
- margin-bottom: 0.5em;
310
- }
311
- .fa, .fas {
312
- font-weight: 900;
313
- margin-right: 21px;
314
- margin-top: 1em;
315
- color: #b6abab;
316
-
317
- }
318
- .mo2fa_pricing_feature_collection{
319
- height: 31em;
320
- }
321
- .mo2fa_limit_pricing_feature_mo_2fa{
322
- color: #b6abab;
323
- font-weight: 500;
324
- }
325
- .mo2fa_unltimate_feature{
326
- text-align: center;
327
- color: #000000;
328
- font-family:Open Sans;
329
- letter-spacing: 0.3px;
330
- padding:0.5em;
331
- font-family:Open Sans;
332
- }
333
- .mo2fa_sec{
334
- width: 27em;
335
- border-radius: 4px;
336
- box-shadow: 1px 0px 11px 0px #ccc;
337
- height: 70em;
338
- border: 1px solid #ccc;
339
- padding-top: 2em;
340
  }
341
  .mo2fa_upgrade_my_plan_ent {
342
  border: none;
@@ -362,29 +363,29 @@ i.fa-times {
362
  background: #114b56;
363
  }
364
  .mo2fa_upgrade_my_plan {
365
- border: none;
366
- top: 50%;
367
- left: 50%;
368
- color: white;
369
- padding: 15px 32px;
370
- width: auto;
371
- min-width: 50%;
372
- border-radius: 26px;
373
- text-align: center;
374
- text-decoration: none;
375
- display: inline-block;
376
- background: #1f3668;
377
- font-size: 16px;
378
- height: auto;
379
- margin-top: 24px;
380
- cursor:pointer;
381
  }
382
  .mo2fa_upgrade_my_plan:hover {
383
  border: none;
384
  background: #476198;
385
  }
386
- .mo2fa_plugins{
387
- width: 12%;
388
  }
389
  .mo2fa_pricing_tabs_mo {
390
  background: #fff;
@@ -395,256 +396,259 @@ i.fa-times {
395
  padding-top: 2em;
396
  box-shadow: 0 1px 2px 0 rgb(60 64 67 / 30%), 0 1px 3px 1px rgb(60 64 67 / 15%);
397
  }
398
- .mo2fa_make_my_plan_mo{
399
- border: none;
400
- color: white;
401
- padding: 15px 32px;
402
- width: 55%;
403
- border-radius: 26px;
404
- text-align: center;
405
- text-decoration: none;
406
- display: inline-block;
407
- background: #2a80ca;
408
- font-size: 16px;
409
- height: auto;
410
- }
411
- .mo2fa_make_my_plan_mo:hover{
412
- border: none;
413
- color: white;
414
- background: #8d86f5;
415
- }
416
- .mo2fa_web_sec{
417
- padding:20px 0;
418
- }
419
- .mo2fa_pricing_head_mo_2fa{
420
- font-size: 20px;
421
- color: white;
422
- line-height: 1.6;
423
- margin-bottom: 3%;
424
- font-family:unset;
425
- }
426
- .mo2fa_method-list-size{
427
- font-size: 11px;
428
- margin-bottom: -3px!important;
429
- list-style: none!important;
430
- margin-left: 2em;
431
- font-weight: 450;
432
- }
433
- .mo2fa_method-list-mo-size-cross{
434
- font-size: 11px;
435
- color: #b6abab;
436
- margin-bottom: -3px!important;
437
- list-style: none!important;
438
- margin-left: 2em;
439
- }
440
- .mo2fa_price_mo_2fa{
441
- font-size: 35px;
442
- font-weight: bold;
443
- color: black;
444
- }
445
- .mo2fa_purchase_user_limit_mo{
446
- margin-top: 22px!important;
447
- margin-bottom: 0px!important;
448
- color: black;
449
- }
450
- .mo2fa_purchase_otp_limit{
451
- margin-top: 10px!important;
452
- margin-bottom: 4px!important;
453
- color: black;
454
- }
455
- .mo2fa_increase_my_limit{
456
- width:40%;
457
- color: black;
458
- font-size: 11px;
459
- background: #c9dbdb75;
460
- border-radius: 3px;
461
- min-height: 27px;
462
- margin-left: -10px;
463
- margin-right: 3px;
464
- }
465
- .mo2fa_feature{
466
- margin-top: -0.5em;
467
- margin-bottom: 0.5em;
468
- font-size:16px;
469
- }
470
- .mo2fa_ul{
471
- font-size: 15px;
472
- }
473
- .mo2fa_ul li{
474
- font-size: 14px;
475
- font-family: system-ui;
476
  }
477
 
478
- .mo2fa_ul li:nth-of-type(2n+1) {
479
- background-color: rgba(23,61,80,.06);
480
- }
481
- .mo2fa_more_details_p,.mo2fa_more_details_p1{
482
- font-size: 13px;
483
- margin-bottom: -10px;
484
- margin-top: 1em;
485
- font-weight:bold;
486
- color:#4545ff;
487
- text-align: center;
488
- }
489
- .mo2fa_class{
490
- background: aliceblue;
491
- width: 85%;
492
- }
493
- .mo2fa_pricing{
494
- padding: 16px 55px 12px 41px;
495
- height: 10em;
496
- }
497
- .mo2fa_pricing_p{
498
- font-size: 10px;
499
- margin-bottom: -21px;
500
- }
501
- .mo2fa_dollar{
502
- font-size: 46px;
503
- font-weight: 600;
504
- padding: 5px 5px 5px 5px;
505
- margin-top: 35px;
506
- color:white;
507
- }
508
- .mo2fa_country{
509
- margin-top: 2px;
510
- }
511
- .mo2fa_payment_p{
512
- font-size: 110%;
513
- }
514
- .mo2fa_card{
515
- size: landscape;
516
- width: 100px;
517
- height: 27px;
518
- margin-bottom: 4px;
519
- margin-top: 4px;
520
- opacity: 1;
521
- padding-left: 8px;
522
- }
523
- .mo2fa_hr{
524
- border-top: 2px solid #143af4;
525
- }
526
- .mo2fa_form_control1{
527
- border-radius:5px;
528
- width:70%;
529
- }
530
- .mo2fa_starting_from{
531
- font-size: 10px;
532
- margin-left: -24px;
533
- }
534
- .mo2fa_center{
535
- text-align: center;
536
- }
537
- .mo2fa_pricing_tabs_mo_premium_lite{
538
- background: ffffffad;
539
- border: none!important;
540
- }
541
- .mo2fa_pricing_tabs_mo_premium{
542
- background: ffffffad;
543
- border: none;
544
- box-shadow: 12px;
545
- }
546
- .mo2fa_pricing_tabs_mo_enterprise{
547
- background: ffffffad;
548
- border: none!important;
549
- }
550
- .mo2f_upgrade_super_div{
551
- display: flex;
552
- justify-content: center;
553
- align-content: center;
554
- }
555
- .mo2fa_recommended{
556
- width: 100%;
557
- background: #2a80caa6;
558
- color: white;
559
- height: 3em;
560
- margin-left: 0px;
561
- margin-top: -2em;
562
- font-size: 16px;
563
- margin-bottom: 2em;
564
- padding: 10px 1px 1px 1px;
565
- }
566
- .mo2fa_purchase_limit_mo{
567
- font-size: 16px;
568
- }
569
- .mo2fa_pricing_head_h5{
570
- margin :0.67em;
571
- }
572
- .mo2fa_h4{
573
- font-size: 1.5em;
574
- margin: 0.33em 0;
575
- font-weight: 400;
576
- }
577
- .mo2fa_note_color{
578
- color: red;
579
- }
580
- .mo2fa_note{
581
- font-size:17px;
582
- }
583
- .mo2fa_setting_layout{
584
- width: 81.5%;
585
- margin-left: 8%;
586
- margin-top: 1%;
587
- box-shadow: 0px 2px 25px 0px #ccc;
588
- }
589
- .mo2fa_bank_transfer{
590
- height: 28px;
591
- width:auto;
592
- }
593
- .mo2fa_category_feature{
594
- font-size: 16px;
595
- font-weight: 600;
596
- padding-bottom: 0.3em;
597
- padding-top: 0.3em;
598
- }
599
- .mo2fa_main_category_header{
600
- background: #d5d5d5!important;
601
- margin-top: 0.3em;
602
- margin-bottom: 0.3em;
 
603
  }
604
  .mo2fa_bg_category_main {
605
  font-size: 17px;
606
  border: 0.5px solid #c1c1c1;
607
  background: #c9dbdb !important;
608
  }
609
- .mo2fa_description{
610
- font-size: 13px!important;
611
- font-weight: 400;
612
  }
613
- table.mo2fa_table_features{
614
- border: 1px 1px 1px 1px;
615
  }
616
- table.mo2fa_table_features th,table.mo2fa_table_features tr{
617
- text-align: left;
618
- padding-left: 1em;
619
- padding-right: 1em;
620
- height:25px;
 
621
  }
622
- table.mo2fa_table_features,table.mo2fa_table_features th,table.mo2fa_table_features td {
 
 
623
  border-left: 1px solid #c1c1c1;
624
  border-right: 1px solid #c1c1c1;
625
  border-collapse: collapse;
626
  }
627
- table.mo2fa_table_features tr:nth-child(odd){
628
- background-color: #f6f6f6;
629
  }
630
- table.mo2fa_table_features tr:last-child
631
- {
632
- border-bottom: 1px solid #c1c1c1;
633
  }
634
  .mo2fa_hide {
635
  display: none !important;
636
  }
637
 
638
- .mo2fa_hide1{
639
- display: none;
640
  }
641
- .mo2fa_comparison{
642
- font-size: 18px;
643
- width: 20%;
644
  }
645
- .mo2fa_compare1{
646
- min-width: 22%!important;
647
- width:10%;
648
  }
649
  .mo2fa_tooltip_sms_info {
650
  position: relative;
@@ -652,17 +656,17 @@ table.mo2fa_table_features tr:last-child
652
  }
653
 
654
  .mo2fa_tooltip_sms_info .mo2fa_sms_info {
655
- visibility: hidden;
656
- width: 15em;
657
- background-color: #000000b8;
658
- color: #fff;
659
- text-align: left;
660
- border-radius: 6px;
661
- padding: 7px 6px 8px 10px;
662
- position: absolute;
663
- z-index: 1;
664
- top: 0px;
665
- left: 107%;
666
  }
667
  .mo2fa_tooltip_sms_info .mo2fa_sms_info::after {
668
  content: "";
@@ -682,17 +686,17 @@ table.mo2fa_table_features tr:last-child
682
  display: inline-block;
683
  }
684
  .mo2fa_tooltip_methodlist .mo2fa_methodlist {
685
- visibility: hidden;
686
- width: 14em;
687
- background-color: #000000b8;
688
- color: #fff;
689
- text-align: left;
690
- border-radius: 6px;
691
- padding: 11px 1px 11px 43px;
692
- position: absolute;
693
- z-index: 1;
694
- top: -9.4em;
695
- left: 95%;
696
  }
697
  .mo2fa_tooltip_methodlist .mo2fa_methodlist::after {
698
  content: "";
@@ -709,351 +713,351 @@ table.mo2fa_table_features tr:last-child
709
  }
710
 
711
  .mo2fa_ent_tooltip_methodlist {
712
- position: relative;
713
- display: inline-block;
714
- }
715
- .mo2fa_ent_tooltip_methodlist .mo2fa_methodlist {
716
- visibility: hidden;
717
- width: 14em;
718
- background-color: #000000b8;
719
- color: #fff;
720
- text-align: left;
721
- border-radius: 6px;
722
- padding: 11px 1px 11px 43px;
723
- position: absolute;
724
- z-index: 1;
725
- top: -128px;
726
- right: 110%;
727
- }
728
- .mo2fa_ent_tooltip_methodlist .mo2fa_methodlist::after {
729
- content: "";
730
- position: absolute;
731
- top: 50%;
732
- left: 100%;
733
- margin-top: -5px;
734
- border-width: 5px;
735
- border-style: solid;
736
- border-color: transparent transparent transparent black;
737
- }
738
- .mo2fa_ent_tooltip_methodlist:hover .mo2fa_methodlist {
739
- visibility: visible;
740
- }
741
  .mo2fa_rba_tooltip_methodlist {
742
- position: relative;
743
- display: inline-block;
744
- }
745
- .mo2fa_rba_tooltip_methodlist .mo2fa_methodlist {
746
- visibility: hidden;
747
- width: 14em;
748
- background-color: #000000b8;
749
- color: #fff;
750
- text-align: left;
751
- border-radius: 6px;
752
- padding: 7px 0px 8px 11px;
753
- position: absolute;
754
- z-index: 1;
755
- top: -2.6em;
756
- left: 93%;
757
- }
758
- .mo2fa_rba_tooltip_methodlist .mo2fa_methodlist::after {
759
- content: "";
760
- position: absolute;
761
- top: 50%;
762
- right: 100%;
763
- margin-top: -5px;
764
- border-width: 5px;
765
- border-style: solid;
766
- border-color: transparent black transparent transparent;
767
- }
768
- .mo2fa_rba_tooltip_methodlist:hover .mo2fa_methodlist {
769
- visibility: visible;
770
- }
771
- .mo2fa_ent_rba_tooltip_methodlist {
772
- position: relative;
773
- display: inline-block;
774
- }
775
- .mo2fa_ent_rba_tooltip_methodlist .mo2fa_methodlist {
776
- visibility: hidden;
777
- width: auto;
778
- min-width:10em;
779
- background-color: #000000b8;
780
- color: #fff;
781
- text-align: left;
782
- border-radius: 6px;
783
- padding: 11px 6px 11px 17px;
784
- position: absolute;
785
- z-index: 1;
786
- top: -37px;
787
- right: 108%;
788
- }
789
- .mo2fa_ent_rba_tooltip_methodlist .mo2fa_methodlist::after {
790
- content: "";
791
- position: absolute;
792
- top: 50%;
793
- left: 100%;
794
- margin-top: -5px;
795
- border-width: 5px;
796
- border-style: solid;
797
- border-color: transparent transparent transparent black;
798
- }
799
- .mo2fa_ent_rba_tooltip_methodlist:hover .mo2fa_methodlist {
800
- visibility: visible;
801
- }
802
- .mo2fa_redirect_tooltip_methodlist {
803
- position: relative;
804
- display: inline-block;
805
- }
806
- .mo2fa_redirect_tooltip_methodlist .mo2fa_methodlist {
807
- visibility: hidden;
808
- width: 17em;
809
- background-color: #000000b8;
810
- color: #fff;
811
- text-align: left;
812
- border-radius: 6px;
813
- padding: 10px 3px 10px 34px;
814
- position: absolute;
815
- z-index: 1;
816
- top: -2.1em;
817
- left: 93%;
818
- }
819
- .mo2fa_redirect_tooltip_methodlist .mo2fa_methodlist::after {
820
- content: "";
821
- position: absolute;
822
- top: 50%;
823
- right: 100%;
824
- margin-top: -5px;
825
- border-width: 5px;
826
- border-style: solid;
827
- border-color: transparent black transparent transparent;
828
- }
829
- .mo2fa_redirect_tooltip_methodlist:hover .mo2fa_methodlist {
830
- visibility: visible;
831
- }
832
- .mo2fa_ent_redirect_tooltip_methodlist {
833
- position: relative;
834
- display: inline-block;
835
- }
836
- .mo2fa_ent_redirect_tooltip_methodlist .mo2fa_methodlist {
837
- visibility: hidden;
838
- width: auto;
839
- min-width:20em;
840
- background-color: #000000b8;
841
- color: #fff;
842
- text-align: left;
843
- border-radius: 6px;
844
- padding: 11px 1px 11px 13px;
845
- position: absolute;
846
- z-index: 1;
847
- top: -28px;
848
- right: 105%;
849
- }
850
- .mo2fa_ent_redirect_tooltip_methodlist .mo2fa_methodlist::after {
851
- content: "";
852
- position: absolute;
853
- top: 50%;
854
- left: 100%;
855
- margin-top: -5px;
856
- border-width: 5px;
857
- border-style: solid;
858
- border-color: transparent transparent transparent black;
859
- }
860
- .mo2fa_ent_redirect_tooltip_methodlist:hover .mo2fa_methodlist {
861
- visibility: visible;
862
- }
863
- .mo2fa_role_tooltip_methodlist {
864
- position: relative;
865
- display: inline-block;
866
- }
867
- .mo2fa_role_tooltip_methodlist .mo2fa_methodlist {
868
- visibility: hidden;
869
- width: auto;
870
- min-width:10em;
871
- background-color: #000000b8;
872
- color: #fff;
873
- text-align: left;
874
- border-radius: 6px;
875
- padding: 6px 7px 8px 17px;
876
- position: absolute;
877
- z-index: 1;
878
- top: -1.1em;
879
- left: 90%;
880
- }
881
- .mo2fa_role_tooltip_methodlist .mo2fa_methodlist::after {
882
- content: "";
883
- position: absolute;
884
- top: 50%;
885
- right: 100%;
886
- margin-top: -5px;
887
- border-width: 5px;
888
- border-style: solid;
889
- border-color: transparent black transparent transparent;
890
- }
891
- .mo2fa_role_tooltip_methodlist:hover .mo2fa_methodlist {
892
- visibility: visible;
893
- }
894
- .mo2fa_ent_role_tooltip_methodlist {
895
- position: relative;
896
- display: inline-block;
897
- }
898
- .mo2fa_ent_role_tooltip_methodlist .mo2fa_methodlist {
899
- visibility: hidden;
900
- width: auto;
901
- min-width:10em;
902
- background-color: #000000b8;
903
- color: #fff;
904
- text-align: left;
905
- border-radius: 6px;
906
- padding: 6px 7px 8px 17px;
907
- position: absolute;
908
- z-index: 1;
909
- top: -17px;
910
- right: 110%;
911
- }
912
- .mo2fa_ent_role_tooltip_methodlist .mo2fa_methodlist::after {
913
- content: "";
914
- position: absolute;
915
- top: 50%;
916
- left: 100%;
917
- margin-top: -5px;
918
- border-width: 5px;
919
- border-style: solid;
920
- border-color: transparent transparent transparent black;
921
- }
922
- .mo2fa_ent_role_tooltip_methodlist:hover .mo2fa_methodlist {
923
- visibility: visible;
924
- }
925
- .mo2fa_custom_sms_tooltip_methodlist {
926
- position: relative;
927
- display: inline-block;
928
- }
929
- .mo2fa_custom_sms_tooltip_methodlist .mo2fa_methodlist {
930
- visibility: hidden;
931
- width: auto;
932
- min-width:16em;
933
- background-color: #000000b8;
934
- color: #fff;
935
- text-align: left;
936
- border-radius: 6px;
937
- padding: 7px 0px 8px 21px;
938
- position: absolute;
939
- z-index: 1;
940
- top: -1.1em;
941
- left: 107%;
942
- }
943
- .mo2fa_custom_sms_tooltip_methodlist .mo2fa_methodlist::after {
944
- content: "";
945
- position: absolute;
946
- top: 50%;
947
- right: 100%;
948
- margin-top: -5px;
949
- border-width: 5px;
950
- border-style: solid;
951
- border-color: transparent black transparent transparent;
952
- }
953
- .mo2fa_custom_sms_tooltip_methodlist:hover .mo2fa_methodlist {
954
- visibility: visible;
955
- }
956
- .mo2fa_ent_custom_sms_tooltip_methodlist {
957
- position: relative;
958
- display: inline-block;
959
- }
960
- .mo2fa_ent_custom_sms_tooltip_methodlist .mo2fa_methodlist {
961
- visibility: hidden;
962
- width: auto;
963
- min-width:16em;
964
- background-color: #000000b8;
965
- color: #fff;
966
- text-align: left;
967
- border-radius: 6px;
968
- padding: 7px 0px 8px 21px;
969
- position: absolute;
970
- z-index: 1;
971
- top: -17px;
972
- right: 106%;
973
- }
974
- .mo2fa_ent_custom_sms_tooltip_methodlist .mo2fa_methodlist::after {
975
- content: "";
976
- position: absolute;
977
- top: 50%;
978
- left: 100%;
979
- margin-top: -5px;
980
- border-width: 5px;
981
- border-style: solid;
982
- border-color: transparent transparent transparent black;
983
- }
984
- .mo2fa_ent_custom_sms_tooltip_methodlist:hover .mo2fa_methodlist {
985
- visibility: visible;
986
- }
987
- .mo2fa_enforce_2fa_tooltip_methodlist {
988
- position: relative;
989
- display: inline-block;
990
- }
991
- .mo2fa_enforce_2fa_tooltip_methodlist .mo2fa_methodlist {
992
- visibility: hidden;
993
- width: 14em;
994
- background-color: #000000b8;
995
- color: #fff;
996
- text-align: left;
997
- border-radius: 6px;
998
- padding: 8px 22px 8px 22px;
999
- position: absolute;
1000
- z-index: 1;
1001
- top: -1.1em;
1002
- left: 94%;
1003
- }
1004
- .mo2fa_enforce_2fa_tooltip_methodlist .mo2fa_methodlist::after {
1005
- content: "";
1006
- position: absolute;
1007
- top: 50%;
1008
- right: 100%;
1009
- margin-top: -5px;
1010
- border-width: 5px;
1011
- border-style: solid;
1012
- border-color: transparent black transparent transparent;
1013
- }
1014
- .mo2fa_enforce_2fa_tooltip_methodlist:hover .mo2fa_methodlist {
1015
- visibility: visible;
1016
- }
1017
- .mo2fa_ent_enforce_2fa_tooltip_methodlist {
1018
- position: relative;
1019
- display: inline-block;
1020
- }
1021
- .mo2fa_ent_enforce_2fa_tooltip_methodlist .mo2fa_methodlist {
1022
- visibility: hidden;
1023
- width: 18em;
1024
- background-color: #000000b8;
1025
- color: #fff;
1026
- text-align: left;
1027
- border-radius: 6px;
1028
- padding: 11px 1px 11px 43px;
1029
- position: absolute;
1030
- z-index: 1;
1031
- top: -26px;
1032
- right: 110%;
1033
- }
1034
- .mo2fa_ent_enforce_2fa_tooltip_methodlist .mo2fa_methodlist::after {
1035
- content: "";
1036
- position: absolute;
1037
- top: 50%;
1038
- left: 100%;
1039
- margin-top: -5px;
1040
- border-width: 5px;
1041
- border-style: solid;
1042
- border-color: transparent transparent transparent black;
1043
- }
1044
- .mo2fa_ent_enforce_2fa_tooltip_methodlist:hover .mo2fa_methodlist {
1045
- visibility: visible;
1046
- }
1047
- .mo2fa_enterprise_getting_started{
1048
- margin-top: -1em;
1049
  }
1050
- .mo2fa_table-scrollbar{
1051
- overflow-y: scroll;
1052
- overflow-x:scroll;
1053
- height: 50%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1054
  }
1055
- .mo2fa_fa-check{
1056
- color: #fff!important;
 
 
 
 
 
1057
  }
1058
  .mo_wpns_upgrade_page_header {
1059
  margin-top: 0%;
@@ -1107,41 +1111,41 @@ table.mo2fa_table_features tr:last-child
1107
  display: grid;
1108
  }
1109
  }
1110
- @media only screen and (min-width: 768px) and (max-width: 1024px){
1111
- .mo2fa_pricing_head_blue{
1112
- background-color: #1f3668;
1113
- border-radius: 1em 1em 50% 50%;
1114
- padding: 1em 1em 2em 0em;
1115
- margin-top: -13%;
1116
- }
1117
- .mo2fa_pricing_head_sky{
1118
- background-color: #327a86;
1119
- border-radius: 1em 1em 50% 50%;
1120
- padding: 1em 1em 2em 0em;
1121
- margin-top: -14%;
1122
- height:15.5em;
1123
- }
1124
- .mo2fa_pricing_tabs_mo{
1125
- height: 95em;
1126
- }
1127
- .mo2fa_increase_my_limit{
1128
- width:6em;
1129
- }
1130
- .mo2fa_unltimate_feature{
1131
- height:2em;
1132
- }
1133
- .mo2f_upgrade_main_div{
1134
- Width:auto;
1135
- }
1136
- .mo2fa_upgrade_my_plan {
1137
- border: none;
1138
- color: white;
1139
- padding: 15px 32px;
1140
- width: auto;
1141
- min-width: 50%;
1142
- border-radius: 26px;
1143
- text-align: center;
1144
- text-decoration: none;
1145
- display: inline-block;
1146
- }
1147
- }
1
+ .mo2fa_pricing_head_blue {
2
+ background-color: #1f3668;
3
+ border-radius: 1em 1em 50% 50%;
4
+ padding: 1em 1em 2em 0em;
5
+ color: white;
6
+ margin-top: -10%;
7
  }
8
  .mo2fa_per_tooltip_methodlist {
9
+ position: relative;
10
+ display: inline-block;
11
  }
12
  .mo2fa_per_tooltip_methodlist .mo2fa_methodlist {
13
+ visibility: hidden;
14
+ width: 13em;
15
+ background-color: #000000b8;
16
+ color: #fff;
17
+ text-align: left;
18
+ border-radius: 6px;
19
+ padding: 12px 2px 12px 28px;
20
+ position: absolute;
21
+ z-index: 1;
22
+ top: -2em;
23
+ left: 107%;
24
  }
25
  .mo2fa_per_tooltip_methodlist:hover .mo2fa_methodlist {
26
+ visibility: visible;
27
+ }
28
  .mo2fa_per_tooltip_methodlist .mo2fa_methodlist::after {
29
+ content: "";
30
+ position: absolute;
31
+ top: 50%;
32
+ right: 100%;
33
+ margin-top: -5px;
34
+ border-width: 5px;
35
+ border-style: solid;
36
+ border-color: transparent black transparent transparent;
37
+ }
38
  .mo2fa_on_per_tooltip_methodlist {
39
+ position: relative;
40
+ display: inline-block;
41
  }
42
  .mo2fa_on_per_tooltip_methodlist .mo2fa_methodlist {
43
+ visibility: hidden;
44
+ width: 14em;
45
+ background-color: #000000b8;
46
+ color: #fff;
47
+ text-align: left;
48
+ border-radius: 6px;
49
+ padding: 12px 2px 12px 28px;
50
+ position: absolute;
51
+ z-index: 1;
52
+ top: -1.6em;
53
+ left: 90%;
54
  }
55
  .mo2fa_on_per_tooltip_methodlist:hover .mo2fa_methodlist {
56
+ visibility: visible;
57
+ }
58
  .mo2fa_on_per_tooltip_methodlist .mo2fa_methodlist::after {
59
+ content: "";
60
+ position: absolute;
61
+ top: 50%;
62
+ right: 100%;
63
+ margin-top: -5px;
64
+ border-width: 5px;
65
+ border-style: solid;
66
+ border-color: transparent black transparent transparent;
67
+ }
 
68
 
69
  .mo2fa_cloud_per_tooltip_methodlist {
70
+ position: relative;
71
+ display: inline-block;
72
  }
73
  .mo2fa_cloud_per_tooltip_methodlist .mo2fa_methodlist {
74
+ visibility: hidden;
75
+ width: 14em;
76
+ background-color: #000000b8;
77
+ color: #fff;
78
+ text-align: left;
79
+ border-radius: 6px;
80
+ padding: 11px 1px 11px 43px;
81
+ position: absolute;
82
+ z-index: 1;
83
+ top: -15px;
84
+ right: 110%;
85
  }
86
  .mo2fa_cloud_per_tooltip_methodlist:hover .mo2fa_methodlist {
87
+ visibility: visible;
88
+ }
89
  .mo2fa_cloud_per_tooltip_methodlist .mo2fa_methodlist::after {
90
+ content: "";
91
+ position: absolute;
92
+ top: 50%;
93
+ left: 100%;
94
+ margin-top: -5px;
95
+ border-width: 5px;
96
+ border-style: solid;
97
+ border-color: transparent transparent transparent black;
98
+ }
99
 
100
  .mo2fa_fido_tooltip_methodlist {
101
+ position: relative;
102
+ display: inline-block;
103
  }
104
  .mo2fa_fido_tooltip_methodlist .mo2fa_methodlist {
105
+ visibility: hidden;
106
+ width: 16em;
107
+ background-color: #000000b8;
108
+ color: #fff;
109
+ text-align: left;
110
+ border-radius: 6px;
111
+ padding: 12px 2px 12px 28px;
112
+ position: absolute;
113
+ z-index: 1;
114
+ top: -1.9em;
115
+ left: 91%;
116
  }
117
  .mo2fa_fido_tooltip_methodlist:hover .mo2fa_methodlist {
118
+ visibility: visible;
119
+ }
120
  .mo2fa_fido_tooltip_methodlist .mo2fa_methodlist::after {
121
+ content: "";
122
+ position: absolute;
123
+ top: 50%;
124
+ right: 100%;
125
+ margin-top: -5px;
126
+ border-width: 5px;
127
+ border-style: solid;
128
+ border-color: transparent black transparent transparent;
129
+ }
130
 
131
  .mo2fa_shortcode_tooltip_methodlist {
132
+ position: relative;
133
+ display: inline-block;
134
  }
135
  .mo2fa_shortcode_tooltip_methodlist .mo2fa_methodlist {
136
+ visibility: hidden;
137
+ width: auto;
138
+ min-width: 26em;
139
+ background-color: #000000b8;
140
+ color: #fff;
141
+ text-align: left;
142
+ border-radius: 6px;
143
+ padding: 7px 0px 8px 8px;
144
+ position: absolute;
145
+ z-index: 1;
146
+ top: -1.1em;
147
+ left: 107%;
148
  }
149
  .mo2fa_shortcode_tooltip_methodlist:hover .mo2fa_methodlist {
150
+ visibility: visible;
151
+ }
152
  .mo2fa_shortcode_tooltip_methodlist .mo2fa_methodlist::after {
153
+ content: "";
154
+ position: absolute;
155
+ top: 50%;
156
+ right: 100%;
157
+ margin-top: -5px;
158
+ border-width: 5px;
159
+ border-style: solid;
160
+ border-color: transparent black transparent transparent;
161
+ }
162
+ .mo2fa_shortcode_ent_tooltip_methodlist {
163
+ position: relative;
164
+ display: inline-block;
165
  }
166
  .mo2fa_shortcode_ent_tooltip_methodlist .mo2fa_methodlist {
167
+ visibility: hidden;
168
+ width: auto;
169
+ min-width: 26em;
170
+ background-color: #000000b8;
171
+ color: #fff;
172
+ text-align: left;
173
+ border-radius: 6px;
174
+ padding: 7px 0px 8px 8px;
175
+ position: absolute;
176
+ z-index: 1;
177
+ top: -15px;
178
+ right: 110%;
179
  }
180
  .mo2fa_shortcode_ent_tooltip_methodlist:hover .mo2fa_methodlist {
181
+ visibility: visible;
182
+ }
183
  .mo2fa_shortcode_ent_tooltip_methodlist .mo2fa_methodlist::after {
184
+ content: "";
185
+ position: absolute;
186
+ top: 50%;
187
+ left: 100%;
188
+ margin-top: -5px;
189
+ border-width: 5px;
190
+ border-style: solid;
191
+ border-color: transparent transparent transparent black;
192
+ }
193
+ #mo2f_upgrade_main_div:hover > #mo2fa-ribbon {
194
+ margin-top: 0%;
195
+ transition: 1s;
196
  }
197
+ .mo2fa_per_year {
198
+ color: white;
199
+ font-size: small;
200
  }
201
  .mo2fa_tooltip {
202
+ position: relative;
203
+ border-bottom: 1px dotted black;
204
  }
205
  .mo2fa_tooltip .mo2fa_tooltiptext {
206
+ visibility: hidden;
207
+ line-height: 1.6;
208
+ font-family: "Times New Roman", Times, serif;
209
+ width: 248px;
210
+ background-color: white;
211
+ color: cadetblue;
212
+ border: 1px solid cadetblue;
213
+ text-align: center;
214
+ border-radius: 6px;
215
+ padding: 10px 0;
216
+ position: absolute;
217
+ z-index: 1;
218
+ top: -5px;
219
+ left: 105%;
220
  }
221
  .mo2fa_tooltip:hover .mo2fa_tooltiptext {
222
+ visibility: visible;
223
+ }
224
  .mo2fa-ribbon span {
225
+ position: absolute;
226
+ width: 154px;
227
+ padding: 19px 0px 15px 68px;
228
+ background-color: #3498db;
229
+ box-shadow: 0 5px 10px rgb(0 0 0 / 10%);
230
+ color: #fff;
231
+ font: 700 14px/1 Lato, sans-serif;
232
+ text-shadow: 0 1px 1px rgb(0 0 0 / 20%);
233
  }
234
  .mo2fa-ribbon-top-right span {
235
+ left: 0;
236
+ top: 19px;
237
+ transform: rotate(45deg);
238
+ z-index: 1;
239
  }
240
  .mo2fa-ribbon {
241
+ width: 160px;
242
+ height: 160px;
243
+ overflow: hidden;
244
+ position: absolute;
245
+ z-index: 0;
246
  }
247
  .mo2fa-ribbon-top-right {
248
+ top: 154px;
249
+ right: 486px;
250
  }
251
  .mo2fa-ribbon::before {
252
+ position: absolute;
253
+ content: "";
254
+ border: 5px solid #2980b9;
255
  }
256
  .mo2fa-ribbon-top-right::before {
257
+ top: -2px;
258
+ left: 34px;
259
  }
260
+ .mo2fa-ribbon::after,
261
+ .mo2fa-ribbon::before {
262
+ position: absolute;
263
+ content: "";
264
+ border: 5px solid #2980b9;
265
  }
266
  .mo2fa-ribbon-top-right::after {
267
+ bottom: 34px;
268
+ right: 0;
269
  }
270
+ .mo2fa_pricing_head_sky {
271
+ background-color: #327a86;
272
+ border-radius: 1em 1em 50% 50%;
273
+ padding: 1em 1em 2em 0em;
274
+ color: white;
275
+ margin-top: -10%;
276
+ height: 15.5em;
277
  }
278
+ .wp-core-ui select {
279
+ padding: 4px 24px 4px 8px;
280
+ margin-left: 1em;
281
  }
282
+ .mo2fa_plan-type {
283
+ text-align: center;
284
+ color: #1f3668;
285
+ font-size: 28px;
286
  }
287
+ .mo2fa_ul li {
288
+ margin-bottom: 0%;
289
  }
290
+ .mo2fa_pricing_feature_collection_supporter {
291
+ height: 32em;
292
  }
293
+ .mo2fa_pricing_head_supporter {
294
+ height: 4em;
295
+ padding: 2px 1px 1px 1px;
296
+ margin-bottom: 1em;
297
  }
298
  i.fa-check {
299
+ color: black;
300
+ margin-left: 2em;
301
+ margin-right: 17px;
302
+ margin-top: 0.5em;
303
+ margin-bottom: 0.5em;
304
  }
305
  i.fa-times {
306
+ color: #b6abab;
307
+ margin-left: 2em;
308
+ margin-right: 17px;
309
+ margin-top: 0.5em;
310
+ margin-bottom: 0.5em;
311
+ }
312
+ .fa,
313
+ .fas {
314
+ font-weight: 900;
315
+ margin-right: 21px;
316
+ margin-top: 1em;
317
+ color: #b6abab;
318
+ }
319
+ .mo2fa_pricing_feature_collection {
320
+ height: 31em;
321
+ }
322
+ .mo2fa_limit_pricing_feature_mo_2fa {
323
+ color: #b6abab;
324
+ font-weight: 500;
325
+ }
326
+ .mo2fa_unltimate_feature {
327
+ text-align: center;
328
+ color: #000000;
329
+ font-family: Open Sans;
330
+ letter-spacing: 0.3px;
331
+ padding: 0.5em;
332
+ font-family: Open Sans;
333
+ }
334
+ .mo2fa_sec {
335
+ width: 27em;
336
+ border-radius: 4px;
337
+ box-shadow: 1px 0px 11px 0px #ccc;
338
+ height: 70em;
339
+ border: 1px solid #ccc;
340
+ padding-top: 2em;
341
  }
342
  .mo2fa_upgrade_my_plan_ent {
343
  border: none;
363
  background: #114b56;
364
  }
365
  .mo2fa_upgrade_my_plan {
366
+ border: none;
367
+ top: 50%;
368
+ left: 50%;
369
+ color: white;
370
+ padding: 15px 32px;
371
+ width: auto;
372
+ min-width: 50%;
373
+ border-radius: 26px;
374
+ text-align: center;
375
+ text-decoration: none;
376
+ display: inline-block;
377
+ background: #1f3668;
378
+ font-size: 16px;
379
+ height: auto;
380
+ margin-top: 24px;
381
+ cursor: pointer;
382
  }
383
  .mo2fa_upgrade_my_plan:hover {
384
  border: none;
385
  background: #476198;
386
  }
387
+ .mo2fa_plugins {
388
+ width: 12%;
389
  }
390
  .mo2fa_pricing_tabs_mo {
391
  background: #fff;
396
  padding-top: 2em;
397
  box-shadow: 0 1px 2px 0 rgb(60 64 67 / 30%), 0 1px 3px 1px rgb(60 64 67 / 15%);
398
  }
399
+ .mo2fa_make_my_plan_mo {
400
+ border: none;
401
+ color: white;
402
+ padding: 15px 32px;
403
+ width: 55%;
404
+ border-radius: 26px;
405
+ text-align: center;
406
+ text-decoration: none;
407
+ display: inline-block;
408
+ background: #2a80ca;
409
+ font-size: 16px;
410
+ height: auto;
411
+ }
412
+ .mo2fa_make_my_plan_mo:hover {
413
+ border: none;
414
+ color: white;
415
+ background: #8d86f5;
416
+ }
417
+ .mo2fa_web_sec {
418
+ padding: 20px 0;
419
+ }
420
+ .mo2fa_pricing_head_mo_2fa {
421
+ font-size: 20px;
422
+ color: white;
423
+ line-height: 1.6;
424
+ margin-bottom: 3%;
425
+ font-family: unset;
426
+ }
427
+ .mo2fa_method-list-size {
428
+ font-size: 11px;
429
+ margin-bottom: -3px !important;
430
+ list-style: none !important;
431
+ margin-left: 2em;
432
+ font-weight: 450;
433
+ }
434
+ .mo2fa_method-list-mo-size-cross {
435
+ font-size: 11px;
436
+ color: #b6abab;
437
+ margin-bottom: -3px !important;
438
+ list-style: none !important;
439
+ margin-left: 2em;
440
+ }
441
+ .mo2fa_price_mo_2fa {
442
+ font-size: 35px;
443
+ font-weight: bold;
444
+ color: black;
445
+ }
446
+ .mo2fa_purchase_user_limit_mo {
447
+ margin-top: 22px !important;
448
+ margin-bottom: 0px !important;
449
+ color: black;
450
+ }
451
+ .mo2fa_purchase_otp_limit {
452
+ margin-top: 10px !important;
453
+ margin-bottom: 4px !important;
454
+ color: black;
455
+ }
456
+ .mo2fa_increase_my_limit {
457
+ width: 40%;
458
+ color: black;
459
+ font-size: 11px;
460
+ background: #c9dbdb75;
461
+ border-radius: 3px;
462
+ min-height: 27px;
463
+ margin-left: -10px;
464
+ margin-right: 3px;
465
+ }
466
+ .mo2fa_feature {
467
+ margin-top: -0.5em;
468
+ margin-bottom: 0.5em;
469
+ font-size: 16px;
470
+ }
471
+ .mo2fa_ul {
472
+ font-size: 15px;
473
+ }
474
+ .mo2fa_ul li {
475
+ font-size: 14px;
476
+ font-family: system-ui;
477
  }
478
 
479
+ .mo2fa_ul li:nth-of-type(2n + 1) {
480
+ background-color: rgba(23, 61, 80, 0.06);
481
+ }
482
+ .mo2fa_more_details_p,
483
+ .mo2fa_more_details_p1 {
484
+ font-size: 13px;
485
+ margin-bottom: -10px;
486
+ margin-top: 1em;
487
+ font-weight: bold;
488
+ color: #4545ff;
489
+ text-align: center;
490
+ }
491
+ .mo2fa_class {
492
+ background: aliceblue;
493
+ width: 85%;
494
+ }
495
+ .mo2fa_pricing {
496
+ padding: 16px 55px 12px 41px;
497
+ height: 10em;
498
+ }
499
+ .mo2fa_pricing_p {
500
+ font-size: 10px;
501
+ margin-bottom: -21px;
502
+ }
503
+ .mo2fa_dollar {
504
+ font-size: 46px;
505
+ font-weight: 600;
506
+ padding: 5px 5px 5px 5px;
507
+ margin-top: 35px;
508
+ color: white;
509
+ }
510
+ .mo2fa_country {
511
+ margin-top: 2px;
512
+ }
513
+ .mo2fa_payment_p {
514
+ font-size: 110%;
515
+ }
516
+ .mo2fa_card {
517
+ size: landscape;
518
+ width: 100px;
519
+ height: 27px;
520
+ margin-bottom: 4px;
521
+ margin-top: 4px;
522
+ opacity: 1;
523
+ padding-left: 8px;
524
+ }
525
+ .mo2fa_hr {
526
+ border-top: 2px solid #143af4;
527
+ }
528
+ .mo2fa_form_control1 {
529
+ border-radius: 5px;
530
+ width: 70%;
531
+ }
532
+ .mo2fa_starting_from {
533
+ font-size: 10px;
534
+ margin-left: -24px;
535
+ }
536
+ .mo2fa_center {
537
+ text-align: center;
538
+ }
539
+ .mo2fa_pricing_tabs_mo_premium_lite {
540
+ background: ffffffad;
541
+ border: none !important;
542
+ }
543
+ .mo2fa_pricing_tabs_mo_premium {
544
+ background: ffffffad;
545
+ border: none;
546
+ box-shadow: 12px;
547
+ }
548
+ .mo2fa_pricing_tabs_mo_enterprise {
549
+ background: ffffffad;
550
+ border: none !important;
551
+ }
552
+ .mo2f_upgrade_super_div {
553
+ display: flex;
554
+ justify-content: center;
555
+ align-content: center;
556
+ }
557
+ .mo2fa_recommended {
558
+ width: 100%;
559
+ background: #2a80caa6;
560
+ color: white;
561
+ height: 3em;
562
+ margin-left: 0px;
563
+ margin-top: -2em;
564
+ font-size: 16px;
565
+ margin-bottom: 2em;
566
+ padding: 10px 1px 1px 1px;
567
+ }
568
+ .mo2fa_purchase_limit_mo {
569
+ font-size: 16px;
570
+ }
571
+ .mo2fa_pricing_head_h5 {
572
+ margin: 0.67em;
573
+ }
574
+ .mo2fa_h4 {
575
+ font-size: 1.5em;
576
+ margin: 0.33em 0;
577
+ font-weight: 400;
578
+ }
579
+ .mo2fa_note_color {
580
+ color: red;
581
+ }
582
+ .mo2fa_note {
583
+ font-size: 17px;
584
+ }
585
+ .mo2fa_setting_layout {
586
+ width: 81.5%;
587
+ margin-left: 8%;
588
+ margin-top: 1%;
589
+ box-shadow: 0px 2px 25px 0px #ccc;
590
+ }
591
+ .mo2fa_bank_transfer {
592
+ height: 28px;
593
+ width: auto;
594
+ }
595
+ .mo2fa_category_feature {
596
+ font-size: 16px;
597
+ font-weight: 600;
598
+ padding-bottom: 0.3em;
599
+ padding-top: 0.3em;
600
+ }
601
+ .mo2fa_main_category_header {
602
+ background: #d5d5d5 !important;
603
+ margin-top: 0.3em;
604
+ margin-bottom: 0.3em;
605
  }
606
  .mo2fa_bg_category_main {
607
  font-size: 17px;
608
  border: 0.5px solid #c1c1c1;
609
  background: #c9dbdb !important;
610
  }
611
+ .mo2fa_description {
612
+ font-size: 13px !important;
613
+ font-weight: 400;
614
  }
615
+ table.mo2fa_table_features {
616
+ border: 1px 1px 1px 1px;
617
  }
618
+ table.mo2fa_table_features th,
619
+ table.mo2fa_table_features tr {
620
+ text-align: left;
621
+ padding-left: 1em;
622
+ padding-right: 1em;
623
+ height: 25px;
624
  }
625
+ table.mo2fa_table_features,
626
+ table.mo2fa_table_features th,
627
+ table.mo2fa_table_features td {
628
  border-left: 1px solid #c1c1c1;
629
  border-right: 1px solid #c1c1c1;
630
  border-collapse: collapse;
631
  }
632
+ table.mo2fa_table_features tr:nth-child(odd) {
633
+ background-color: #f6f6f6;
634
  }
635
+ table.mo2fa_table_features tr:last-child {
636
+ border-bottom: 1px solid #c1c1c1;
 
637
  }
638
  .mo2fa_hide {
639
  display: none !important;
640
  }
641
 
642
+ .mo2fa_hide1 {
643
+ display: none;
644
  }
645
+ .mo2fa_comparison {
646
+ font-size: 18px;
647
+ width: 20%;
648
  }
649
+ .mo2fa_compare1 {
650
+ min-width: 22% !important;
651
+ width: 10%;
652
  }
653
  .mo2fa_tooltip_sms_info {
654
  position: relative;
656
  }
657
 
658
  .mo2fa_tooltip_sms_info .mo2fa_sms_info {
659
+ visibility: hidden;
660
+ width: 15em;
661
+ background-color: #000000b8;
662
+ color: #fff;
663
+ text-align: left;
664
+ border-radius: 6px;
665
+ padding: 7px 6px 8px 10px;
666
+ position: absolute;
667
+ z-index: 1;
668
+ top: 0px;
669
+ left: 107%;
670
  }
671
  .mo2fa_tooltip_sms_info .mo2fa_sms_info::after {
672
  content: "";
686
  display: inline-block;
687
  }
688
  .mo2fa_tooltip_methodlist .mo2fa_methodlist {
689
+ visibility: hidden;
690
+ width: 14em;
691
+ background-color: #000000b8;
692
+ color: #fff;
693
+ text-align: left;
694
+ border-radius: 6px;
695
+ padding: 11px 1px 11px 43px;
696
+ position: absolute;
697
+ z-index: 1;
698
+ top: -9.4em;
699
+ left: 95%;
700
  }
701
  .mo2fa_tooltip_methodlist .mo2fa_methodlist::after {
702
  content: "";
713
  }
714
 
715
  .mo2fa_ent_tooltip_methodlist {
716
+ position: relative;
717
+ display: inline-block;
718
+ }
719
+ .mo2fa_ent_tooltip_methodlist .mo2fa_methodlist {
720
+ visibility: hidden;
721
+ width: 14em;
722
+ background-color: #000000b8;
723
+ color: #fff;
724
+ text-align: left;
725
+ border-radius: 6px;
726
+ padding: 11px 1px 11px 43px;
727
+ position: absolute;
728
+ z-index: 1;
729
+ top: -128px;
730
+ right: 110%;
731
+ }
732
+ .mo2fa_ent_tooltip_methodlist .mo2fa_methodlist::after {
733
+ content: "";
734
+ position: absolute;
735
+ top: 50%;
736
+ left: 100%;
737
+ margin-top: -5px;
738
+ border-width: 5px;
739
+ border-style: solid;
740
+ border-color: transparent transparent transparent black;
741
+ }
742
+ .mo2fa_ent_tooltip_methodlist:hover .mo2fa_methodlist {
743
+ visibility: visible;
744
+ }
745
  .mo2fa_rba_tooltip_methodlist {
746
+ position: relative;
747
+ display: inline-block;
748
+ }
749
+ .mo2fa_rba_tooltip_methodlist .mo2fa_methodlist {
750
+ visibility: hidden;
751
+ width: 14em;
752
+ background-color: #000000b8;
753
+ color: #fff;
754
+ text-align: left;
755
+ border-radius: 6px;
756
+ padding: 7px 0px 8px 11px;
757
+ position: absolute;
758
+ z-index: 1;
759
+ top: -2.6em;
760
+ left: 93%;
761
+ }
762
+ .mo2fa_rba_tooltip_methodlist .mo2fa_methodlist::after {
763
+ content: "";
764
+ position: absolute;
765
+ top: 50%;
766
+ right: 100%;
767
+ margin-top: -5px;
768
+ border-width: 5px;
769
+ border-style: solid;
770
+ border-color: transparent black transparent transparent;
771
+ }
772
+ .mo2fa_rba_tooltip_methodlist:hover .mo2fa_methodlist {
773
+ visibility: visible;
774
+ }
775
+ .mo2fa_ent_rba_tooltip_methodlist {
776
+ position: relative;
777
+ display: inline-block;
778
+ }
779
+ .mo2fa_ent_rba_tooltip_methodlist .mo2fa_methodlist {
780
+ visibility: hidden;
781
+ width: auto;
782
+ min-width: 10em;
783
+ background-color: #000000b8;
784
+ color: #fff;
785
+ text-align: left;
786
+ border-radius: 6px;
787
+ padding: 11px 6px 11px 17px;
788
+ position: absolute;
789
+ z-index: 1;
790
+ top: -37px;
791
+ right: 108%;
792
+ }
793
+ .mo2fa_ent_rba_tooltip_methodlist .mo2fa_methodlist::after {
794
+ content: "";
795
+ position: absolute;
796
+ top: 50%;
797
+ left: 100%;
798
+ margin-top: -5px;
799
+ border-width: 5px;
800
+ border-style: solid;
801
+ border-color: transparent transparent transparent black;
802
+ }
803
+ .mo2fa_ent_rba_tooltip_methodlist:hover .mo2fa_methodlist {
804
+ visibility: visible;
805
+ }
806
+ .mo2fa_redirect_tooltip_methodlist {
807
+ position: relative;
808
+ display: inline-block;
809
+ }
810
+ .mo2fa_redirect_tooltip_methodlist .mo2fa_methodlist {
811
+ visibility: hidden;
812
+ width: 17em;
813
+ background-color: #000000b8;
814
+ color: #fff;
815
+ text-align: left;
816
+ border-radius: 6px;
817
+ padding: 10px 3px 10px 34px;
818
+ position: absolute;
819
+ z-index: 1;
820
+ top: -2.1em;
821
+ left: 93%;
822
+ }
823
+ .mo2fa_redirect_tooltip_methodlist .mo2fa_methodlist::after {
824
+ content: "";
825
+ position: absolute;
826
+ top: 50%;
827
+ right: 100%;
828
+ margin-top: -5px;
829
+ border-width: 5px;
830
+ border-style: solid;
831
+ border-color: transparent black transparent transparent;
832
+ }
833
+ .mo2fa_redirect_tooltip_methodlist:hover .mo2fa_methodlist {
834
+ visibility: visible;
835
+ }
836
+ .mo2fa_ent_redirect_tooltip_methodlist {
837
+ position: relative;
838
+ display: inline-block;
839
+ }
840
+ .mo2fa_ent_redirect_tooltip_methodlist .mo2fa_methodlist {
841
+ visibility: hidden;
842
+ width: auto;
843
+ min-width: 20em;
844
+ background-color: #000000b8;
845
+ color: #fff;
846
+ text-align: left;
847
+ border-radius: 6px;
848
+ padding: 11px 1px 11px 13px;
849
+ position: absolute;
850
+ z-index: 1;
851
+ top: -28px;
852
+ right: 105%;
853
+ }
854
+ .mo2fa_ent_redirect_tooltip_methodlist .mo2fa_methodlist::after {
855
+ content: "";
856
+ position: absolute;
857
+ top: 50%;
858
+ left: 100%;
859
+ margin-top: -5px;
860
+ border-width: 5px;
861
+ border-style: solid;
862
+ border-color: transparent transparent transparent black;
863
+ }
864
+ .mo2fa_ent_redirect_tooltip_methodlist:hover .mo2fa_methodlist {
865
+ visibility: visible;
866
+ }
867
+ .mo2fa_role_tooltip_methodlist {
868
+ position: relative;
869
+ display: inline-block;
870
+ }
871
+ .mo2fa_role_tooltip_methodlist .mo2fa_methodlist {
872
+ visibility: hidden;
873
+ width: auto;
874
+ min-width: 10em;
875
+ background-color: #000000b8;
876
+ color: #fff;
877
+ text-align: left;
878
+ border-radius: 6px;
879
+ padding: 6px 7px 8px 17px;
880
+ position: absolute;
881
+ z-index: 1;
882
+ top: -1.1em;
883
+ left: 90%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
884
  }
885
+ .mo2fa_role_tooltip_methodlist .mo2fa_methodlist::after {
886
+ content: "";
887
+ position: absolute;
888
+ top: 50%;
889
+ right: 100%;
890
+ margin-top: -5px;
891
+ border-width: 5px;
892
+ border-style: solid;
893
+ border-color: transparent black transparent transparent;
894
+ }
895
+ .mo2fa_role_tooltip_methodlist:hover .mo2fa_methodlist {
896
+ visibility: visible;
897
+ }
898
+ .mo2fa_ent_role_tooltip_methodlist {
899
+ position: relative;
900
+ display: inline-block;
901
+ }
902
+ .mo2fa_ent_role_tooltip_methodlist .mo2fa_methodlist {
903
+ visibility: hidden;
904
+ width: auto;
905
+ min-width: 10em;
906
+ background-color: #000000b8;
907
+ color: #fff;
908
+ text-align: left;
909
+ border-radius: 6px;
910
+ padding: 6px 7px 8px 17px;
911
+ position: absolute;
912
+ z-index: 1;
913
+ top: -17px;
914
+ right: 110%;
915
+ }
916
+ .mo2fa_ent_role_tooltip_methodlist .mo2fa_methodlist::after {
917
+ content: "";
918
+ position: absolute;
919
+ top: 50%;
920
+ left: 100%;
921
+ margin-top: -5px;
922
+ border-width: 5px;
923
+ border-style: solid;
924
+ border-color: transparent transparent transparent black;
925
+ }
926
+ .mo2fa_ent_role_tooltip_methodlist:hover .mo2fa_methodlist {
927
+ visibility: visible;
928
+ }
929
+ .mo2fa_custom_sms_tooltip_methodlist {
930
+ position: relative;
931
+ display: inline-block;
932
+ }
933
+ .mo2fa_custom_sms_tooltip_methodlist .mo2fa_methodlist {
934
+ visibility: hidden;
935
+ width: auto;
936
+ min-width: 16em;
937
+ background-color: #000000b8;
938
+ color: #fff;
939
+ text-align: left;
940
+ border-radius: 6px;
941
+ padding: 7px 0px 8px 21px;
942
+ position: absolute;
943
+ z-index: 1;
944
+ top: -1.1em;
945
+ left: 107%;
946
+ }
947
+ .mo2fa_custom_sms_tooltip_methodlist .mo2fa_methodlist::after {
948
+ content: "";
949
+ position: absolute;
950
+ top: 50%;
951
+ right: 100%;
952
+ margin-top: -5px;
953
+ border-width: 5px;
954
+ border-style: solid;
955
+ border-color: transparent black transparent transparent;
956
+ }
957
+ .mo2fa_custom_sms_tooltip_methodlist:hover .mo2fa_methodlist {
958
+ visibility: visible;
959
+ }
960
+ .mo2fa_ent_custom_sms_tooltip_methodlist {
961
+ position: relative;
962
+ display: inline-block;
963
+ }
964
+ .mo2fa_ent_custom_sms_tooltip_methodlist .mo2fa_methodlist {
965
+ visibility: hidden;
966
+ width: auto;
967
+ min-width: 16em;
968
+ background-color: #000000b8;
969
+ color: #fff;
970
+ text-align: left;
971
+ border-radius: 6px;
972
+ padding: 7px 0px 8px 21px;
973
+ position: absolute;
974
+ z-index: 1;
975
+ top: -17px;
976
+ right: 106%;
977
+ }
978
+ .mo2fa_ent_custom_sms_tooltip_methodlist .mo2fa_methodlist::after {
979
+ content: "";
980
+ position: absolute;
981
+ top: 50%;
982
+ left: 100%;
983
+ margin-top: -5px;
984
+ border-width: 5px;
985
+ border-style: solid;
986
+ border-color: transparent transparent transparent black;
987
+ }
988
+ .mo2fa_ent_custom_sms_tooltip_methodlist:hover .mo2fa_methodlist {
989
+ visibility: visible;
990
+ }
991
+ .mo2fa_enforce_2fa_tooltip_methodlist {
992
+ position: relative;
993
+ display: inline-block;
994
+ }
995
+ .mo2fa_enforce_2fa_tooltip_methodlist .mo2fa_methodlist {
996
+ visibility: hidden;
997
+ width: 14em;
998
+ background-color: #000000b8;
999
+ color: #fff;
1000
+ text-align: left;
1001
+ border-radius: 6px;
1002
+ padding: 8px 22px 8px 22px;
1003
+ position: absolute;
1004
+ z-index: 1;
1005
+ top: -1.1em;
1006
+ left: 94%;
1007
+ }
1008
+ .mo2fa_enforce_2fa_tooltip_methodlist .mo2fa_methodlist::after {
1009
+ content: "";
1010
+ position: absolute;
1011
+ top: 50%;
1012
+ right: 100%;
1013
+ margin-top: -5px;
1014
+ border-width: 5px;
1015
+ border-style: solid;
1016
+ border-color: transparent black transparent transparent;
1017
+ }
1018
+ .mo2fa_enforce_2fa_tooltip_methodlist:hover .mo2fa_methodlist {
1019
+ visibility: visible;
1020
+ }
1021
+ .mo2fa_ent_enforce_2fa_tooltip_methodlist {
1022
+ position: relative;
1023
+ display: inline-block;
1024
+ }
1025
+ .mo2fa_ent_enforce_2fa_tooltip_methodlist .mo2fa_methodlist {
1026
+ visibility: hidden;
1027
+ width: 18em;
1028
+ background-color: #000000b8;
1029
+ color: #fff;
1030
+ text-align: left;
1031
+ border-radius: 6px;
1032
+ padding: 11px 1px 11px 43px;
1033
+ position: absolute;
1034
+ z-index: 1;
1035
+ top: -26px;
1036
+ right: 110%;
1037
+ }
1038
+ .mo2fa_ent_enforce_2fa_tooltip_methodlist .mo2fa_methodlist::after {
1039
+ content: "";
1040
+ position: absolute;
1041
+ top: 50%;
1042
+ left: 100%;
1043
+ margin-top: -5px;
1044
+ border-width: 5px;
1045
+ border-style: solid;
1046
+ border-color: transparent transparent transparent black;
1047
+ }
1048
+ .mo2fa_ent_enforce_2fa_tooltip_methodlist:hover .mo2fa_methodlist {
1049
+ visibility: visible;
1050
+ }
1051
+ .mo2fa_enterprise_getting_started {
1052
+ margin-top: -1em;
1053
  }
1054
+ .mo2fa_table-scrollbar {
1055
+ overflow-y: scroll;
1056
+ overflow-x: scroll;
1057
+ height: 50%;
1058
+ }
1059
+ .mo2fa_fa-check {
1060
+ color: #fff !important;
1061
  }
1062
  .mo_wpns_upgrade_page_header {
1063
  margin-top: 0%;
1111
  display: grid;
1112
  }
1113
  }
1114
+ @media only screen and (min-width: 768px) and (max-width: 1024px) {
1115
+ .mo2fa_pricing_head_blue {
1116
+ background-color: #1f3668;
1117
+ border-radius: 1em 1em 50% 50%;
1118
+ padding: 1em 1em 2em 0em;
1119
+ margin-top: -13%;
1120
+ }
1121
+ .mo2fa_pricing_head_sky {
1122
+ background-color: #327a86;
1123
+ border-radius: 1em 1em 50% 50%;
1124
+ padding: 1em 1em 2em 0em;
1125
+ margin-top: -14%;
1126
+ height: 15.5em;
1127
+ }
1128
+ .mo2fa_pricing_tabs_mo {
1129
+ height: 95em;
1130
+ }
1131
+ .mo2fa_increase_my_limit {
1132
+ width: 6em;
1133
+ }
1134
+ .mo2fa_unltimate_feature {
1135
+ height: 2em;
1136
+ }
1137
+ .mo2f_upgrade_main_div {
1138
+ width: auto;
1139
+ }
1140
+ .mo2fa_upgrade_my_plan {
1141
+ border: none;
1142
+ color: white;
1143
+ padding: 15px 32px;
1144
+ width: auto;
1145
+ min-width: 50%;
1146
+ border-radius: 26px;
1147
+ text-align: center;
1148
+ text-decoration: none;
1149
+ display: inline-block;
1150
+ }
1151
+ }
includes/email-New-release.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  function mail_tem()
3
  {
4
  return '
@@ -117,7 +120,7 @@ a[x-apple-data-detectors=\'true\'] {
117
  <tr>
118
  <td style="padding-right: 0px;padding-left: 0px;" align="center">
119
 
120
- <img align="center" border="0" src="https://s3.amazonaws.com/Snowcovered_C_Images/40290_shield.png" alt="" title="" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 34%;max-width: 163.2px;" width="163.2"/>
121
 
122
  </td>
123
  </tr>
1
  <?php
2
+
3
+ global $imagePath;
4
+
5
  function mail_tem()
6
  {
7
  return '
120
  <tr>
121
  <td style="padding-right: 0px;padding-left: 0px;" align="center">
122
 
123
+ <img align="center" border="0" src="'.$imagePath.'includes/images/40290_shield.png" alt="miniOrange 2FA" title="" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 34%;max-width: 163.2px;" width="163.2"/>
124
 
125
  </td>
126
  </tr>
includes/images/40290_shield.png ADDED
Binary file
includes/images/xecurify-logo.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.5.6
7
  * Author: miniOrange
8
  * Author URI: https://miniorange.com
9
  * Text Domain: miniorange-2-factor-authentication
@@ -14,19 +14,20 @@
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.5.6' );
18
  define( 'MO2F_PLUGIN_URL', (plugin_dir_url(__FILE__)));
19
  define( 'MO2F_TEST_MODE', false );
20
  define( 'MO2F_IS_ONPREM', get_option('is_onprem'));
21
 
22
- global $mainDir;
23
  $mainDir = plugin_dir_url(__FILE__);
24
-
25
 
26
  class Miniorange_twoFactor{
27
 
28
  function __construct()
29
  {
 
30
  register_deactivation_hook(__FILE__ , array( $this, 'mo_wpns_deactivate' ) );
31
  register_activation_hook (__FILE__ , array( $this, 'mo_wpns_activate' ) );
32
  add_action( 'admin_menu' , array( $this, 'mo_wpns_widget_menu' ) );
@@ -165,7 +166,7 @@
165
  wp_enqueue_style( 'wp-pointer' );
166
  wp_enqueue_script( 'wp-pointer' );
167
  wp_enqueue_script( 'utils' );
168
- wp_enqueue_style( 'mo_wpns_admin_plugins_page_style', plugins_url( '/includes/css/style_settings.css?ver=5.5.5', __FILE__ ) );
169
 
170
  include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'feedback_form.php';;
171
 
@@ -459,7 +460,7 @@
459
  {
460
  if($type=="CUSTOM_MESSAGE")
461
  {
462
- echo "<div class='overlay_not_JQ_success' id='pop_up_success'><p class='popup_text_not_JQ'>".$content."</p> </div>";
463
  ?>
464
  <script type="text/javascript">
465
  setTimeout(function () {
@@ -473,7 +474,7 @@
473
  }
474
  if($type=="NOTICE")
475
  {
476
- echo "<div class='overlay_not_JQ_error' id='pop_up_error'><p class='popup_text_not_JQ'>".$content."</p> </div>";
477
  ?>
478
  <script type="text/javascript">
479
  setTimeout(function () {
@@ -551,7 +552,7 @@
551
  require('helper/messages.php');
552
  require('views/common-elements.php');
553
  require('handler/realtime_ip_block_free.php');
554
- require('handler/twofa/two_fa_short_custom.php');
555
  require('controllers/wpns-loginsecurity-ajax.php');
556
  require('controllers/malware_scanner/malware_scan_ajax.php');
557
  require('controllers/duo_authenticator/duo_authenticator_ajax.php');
@@ -582,6 +583,50 @@
582
 
583
  }
584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
 
586
 
587
  function mo2f_mapped_email_column($columns) {
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.5.7
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.5.7' );
18
  define( 'MO2F_PLUGIN_URL', (plugin_dir_url(__FILE__)));
19
  define( 'MO2F_TEST_MODE', false );
20
  define( 'MO2F_IS_ONPREM', get_option('is_onprem'));
21
 
22
+ global $mainDir,$imagePath;
23
  $mainDir = plugin_dir_url(__FILE__);
24
+ $imagePath = plugin_dir_url( __FILE__ );
25
 
26
  class Miniorange_twoFactor{
27
 
28
  function __construct()
29
  {
30
+ add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), [ $this, 'mo2f_add_plugin_action_link' ], 10, 1 );
31
  register_deactivation_hook(__FILE__ , array( $this, 'mo_wpns_deactivate' ) );
32
  register_activation_hook (__FILE__ , array( $this, 'mo_wpns_activate' ) );
33
  add_action( 'admin_menu' , array( $this, 'mo_wpns_widget_menu' ) );
166
  wp_enqueue_style( 'wp-pointer' );
167
  wp_enqueue_script( 'wp-pointer' );
168
  wp_enqueue_script( 'utils' );
169
+ wp_enqueue_style( 'mo_wpns_admin_plugins_page_style', plugins_url( '/includes/css/style_settings.css?ver=5.5.7', __FILE__ ) );
170
 
171
  include $mo2f_dirName . 'views'.DIRECTORY_SEPARATOR.'feedback_form.php';;
172
 
460
  {
461
  if($type=="CUSTOM_MESSAGE")
462
  {
463
+ echo "<div class='overlay_not_JQ_success' id='pop_up_success'><p class='popup_text_not_JQ'>".esc_html($content)."</p> </div>";
464
  ?>
465
  <script type="text/javascript">
466
  setTimeout(function () {
474
  }
475
  if($type=="NOTICE")
476
  {
477
+ echo "<div class='overlay_not_JQ_error' id='pop_up_error'><p class='popup_text_not_JQ'>".esc_html($content)."</p> </div>";
478
  ?>
479
  <script type="text/javascript">
480
  setTimeout(function () {
552
  require('helper/messages.php');
553
  require('views/common-elements.php');
554
  require('handler/realtime_ip_block_free.php');
555
+ require('handler/twofa/class-twofacustomregformshortcode.php');
556
  require('controllers/wpns-loginsecurity-ajax.php');
557
  require('controllers/malware_scanner/malware_scan_ajax.php');
558
  require('controllers/duo_authenticator/duo_authenticator_ajax.php');
583
 
584
  }
585
 
586
+ public function mo2f_add_plugin_action_link( $links ) {
587
+
588
+ $custom['pro'] = sprintf(
589
+ '<a href="%1$s" aria-label="%2$s" target="_blank" rel="noopener noreferrer"
590
+ style="color: #EF8354; font-weight: 700;"
591
+ onmouseover="this.style.color=\'#F5AD8F\';"
592
+ onmouseout="this.style.color=\'#EF8354\';"
593
+ >%3$s</a>',
594
+ // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
595
+
596
+ esc_url( add_query_arg(
597
+ [
598
+ 'utm_content' => 'pricing',
599
+ 'utm_campaign' => 'mo2f',
600
+ 'utm_medium' => 'wp',
601
+ 'utm_source' => 'wpf_plugin',
602
+ ],
603
+ 'https://plugins.miniorange.com/2-factor-authentication-for-wordpress-wp-2fa#pricing'
604
+ ) ),
605
+ esc_attr( 'Upgrade to Premium'),
606
+ esc_html( 'Upgrade to Premium')
607
+ );
608
+
609
+
610
+ $custom['docs'] = sprintf(
611
+ '<a href="%1$s" target="_blank" aria-label="%2$s" rel="noopener noreferrer">%3$s</a>',
612
+ esc_url(
613
+ add_query_arg(
614
+ [
615
+ 'utm_content' => 'docs',
616
+ 'utm_campaign' => 'mo2f',
617
+ 'utm_medium' => 'wp',
618
+ 'utm_source' => 'wpf_plugin',
619
+ ],
620
+ 'https://plugins.miniorange.com/wordpress-two-factor-authentication-setup-guides'
621
+ )
622
+ ),
623
+ esc_attr( 'miniorange.com documentation page'),
624
+ esc_html( 'Docs')
625
+ );
626
+
627
+ return array_merge( $custom, (array) $links );
628
+ }
629
+
630
 
631
 
632
  function mo2f_mapped_email_column($columns) {
readme.txt CHANGED
@@ -1,27 +1,27 @@
1
  === miniOrange's Google Authenticator - WordPress Two Factor Authentication (2FA , Two Factor, OTP SMS and Email) | Passwordless login ===
2
 
3
  Contributors: twofactor, twofactorauthentication, hsn97,cyberlord92
4
- Tags: google authenticator,two factor,two factor authentication, 2FA, OTP , wp 2fa, 2-factor authentication, multi factor authentication , MFA ,two step verification, TFA, mobile verification, MFA, Remember Device, OTP Over Telegram, Mobile Authentication, 2 step authentication, passwordless login, QR Code Authentication, email verification, KBA, Security Questions, login with SMS, Authy, Authy two factor , FIDO, FIDO2, Webauthn, multi factor, wordfence, IP Blocking, IP Whitelisting, SMS login, OTP Over SMS and Email, login without password, Mobile verification, password free authentication, session restriction.
5
  Donate link: https://miniorange.com/
6
  Requires at least: 3.0.1
7
  Tested up to: 6.0
8
  Requires PHP: 5.3.0
9
- Stable tag: 5.5.6
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
13
- Google Authenticator-multi Factor(WP 2FA/OTP) - Supports TOTP-based methods like Duo/Google Authenticator along with OTP Over SMS/Email & more.
14
 
15
  == Description ==
16
 
17
- **Google Authenticator - Two Factor (WP 2FA/OTP)** - Provides *secure login* to WordPress. This plugin can be configured for any **TOTP-based** methods like Duo/Microsoft/Google Authenticator. It supports OTP-based 2fa methods.
18
 
19
  You can check out following video to configure google authenticator as a two factor:
20
 
21
  [youtube https://youtu.be/_nkMCkxLcIs]
22
 
23
  = Trial for Google authenticator Premium and Enterprise plugin =
24
- We do provide 7 days trial of our Google Authenticator Premium plugins. You can test all Premium features including 2fa methods such as google authenticator, OTP Over SMS/Email.
25
 
26
  = [Google Authenticator - Two step verification/ 2 Factor Authentication/ WP 2FA] FREE Plugin Features =
27
  * Simplified & easy user interface to set up **Google Authenticator** and other Two-Factor Authentication ( WP 2FA/TFA/OTP ) methods.
@@ -29,10 +29,10 @@ We do provide 7 days trial of our Google Authenticator Premium plugins. You can
29
  * QR Code authentication, Push Notification, Soft Token and Security Questions(KBA) are supported in the plugin for multi factor authentication(WP 2FA/TFA).
30
  * Includes Language Translation Support
31
  * **[User Profile 2fa](https://plugins.miniorange.com/how-to-set-up-2-factor-from-wordpress-user-profile-section):** Administrators can set up Two Factor (TFA)of users via WordPress users section
32
- * **Multi Factor Authentication(MFA):** This feature can be used to invoke any two factor method on login among multiple methods which were configured. You can configure multiple 2fa methods that can be used as a **backup 2fa method**
33
  * **Two-Factor Authentication** ( TFA/2FA ) for Ajax login forms like User Pro, login with ajax, Theme my login, etc with all authentication methods.
34
  * **Passwordless login** and login with phone number
35
- * **[Prevent account sharing](https://security.miniorange.com/restricting-users-from-sharing-their-login-credentials/):** Google Authenticator(WP 2FA) restricts users from sharing WordPress login credentials which help to secure WordPress Websites. The Google authenticator plugin also adds a session control feature that limits user sessions based on WordPress User activities.
36
  * This plugin Supports standard TOTP
37
  * Two-Factor Authentication (WP 2FA/TFA) allows authentication on the login page itself for Google Authenticator & miniOrange Soft Token
38
  * **[Multiple Login Options](https://docs.miniorange.com/documentation/login-username-2nd-factor-2):** Username + password + two-factor (or) Username + two-factor i.e. Passwordless login /Login without password /Password free authentication
@@ -62,7 +62,7 @@ We do provide 7 days trial of our Google Authenticator Premium plugins. You can
62
  * Reporting
63
  * Audit Log
64
 
65
- = Apps Supported by the two-factor authentication (2FA/MFA) plugin =
66
  * Google Authenticator
67
  * miniOrange Authenticator
68
  * Duo Authenticator
@@ -72,14 +72,14 @@ We do provide 7 days trial of our Google Authenticator Premium plugins. You can
72
  * FreeOTP Authenticator
73
 
74
  = User Identity Verification or multi-factor authentication with Google Authenticator =
75
- **Login and Registration:** Verify users on login with different two factor methods like OTP over SMS, OTP Over Email, OTP Over Telegram, Google Authenticator, SMS Verification, Email, Authy Authenticator, Duo Authenticator, Microsoft Authenticator, TOTP Based Authenticator, Security Questions, and many others.
76
- Users will receive an OTP at the time of registration which will be used to verify their identity. OTP can be received either via OTP Over email or via OTP over SMS.
77
 
78
- = Plugin Integrations and Support for all methods of two-factor authentication/two step verification ( WP 2FA/TFA/OTP ) =
79
  Our plugin is integrated with [popular Plugins](https://plugins.miniorange.com/2-factor-authentication-for-wordpress-wp-2fa#integrations) such as WooCommerce and Ultimate member.
80
 
81
- = Third Party Custom SMS Gateway for OTP Over SMS (two-factor authentication / 2FA ) =
82
- The premium plugin supports any third-party **custom SMS Gateway**. If you don't have your SMS gateway you can use miniOrange gateway and send SMS(OTP over SMS) all over the world.
83
  [Here](https://plugins.miniorange.com/supported-sms-email-gateways) are some famous gateways supported for two factor (WP 2FA/TFA/OTP).
84
  [Test your Gateway](https://login.xecurify.com/moas/login?redirectUrl=https://login.xecurify.com/moas/admin/customer/smsconfig)
85
 
@@ -91,7 +91,7 @@ Adding to this, you can also use the same account on multiple applications and y
91
  = Google Authenticator ( WP 2FA - two-factor authentication ) Premium Lite Plugin Features =
92
 
93
  * Google Authenticator - Two-Factor Authentication (WP 2FA/TFA) for all users and all user roles *( Site-based pricing )*
94
- * **Two-Factor Authentication Methods:** Google Authenticator, Authy Authenticator, Microsoft Authenticator, LastPass Authenticator, Security Questions(KBA), OTP Over Email, OTP Over SMS, Email Verification, Mobile Verification *( SMS credits need to be purchased as per the need)*
95
  * **[Multiple Login Options](https://docs.miniorange.com/documentation/login-username-2nd-factor-2):** Username + password + two-factor (or) Username + two-factor i.e. Passwordless login /Login without password /Password free authentication. With google authenticator plugin, the 2FA plugin user is authenticated directly with the second layer of security without entering the password. You can opt between a password and 2FA or only a second factor.
96
  * **Unlimited Email transactions:** miniOrange's google authenticator plugin provides unlimited Email transactions with your SMTP server
97
  * **Backup Method:** KBA(Security Questions), OTP Over Email, Backup codes if you are unable to validate two step verification
@@ -105,10 +105,10 @@ Adding to this, you can also use the same account on multiple applications and y
105
  * [Remember Device to skip 2fa](https://docs.miniorange.com/documentation/remember-my-device)
106
  * **Customizable Login UI Popup:** Using google authenticator plugin you can customize the user interface of the login popup as per your preference.
107
 
108
- = Google Authenticator ( WP 2FA/OTP ) Enterprise Plugin Features =
109
 
110
  * [Google Authenticator - Two-Factor Authentication](https://plugins.miniorange.com/2-factor-authentication-for-wordpress) - 2FA for Users as per the upgrade *( User-based pricing )*
111
- * **Available Authentication Methods:** Google Authenticator, Authy Authenticator, Microsoft Authenticator, LastPass Authenticator, QR Code, Push Notification, Soft Token, Security Questions(KBA), OTP Over Email, OTP Over SMS, OTP Over SMS and Email, Email Verification, Hardware Token. *( SMS and Email credits need to be purchased as per the need)*
112
  * **Multiple Login Options:** Username + password + two-factor Authentication (or) Username + two-factor authentication(2FA) i.e. Passwordless login /Login without password /Password free authentication.
113
  * **Backup Methods:** KBA(Security Questions), OTP Over Email, Backup Codes
114
  * **[Sync 2fa for multiple websites](https://plugins.miniorange.com/two-factor-authentication-2fa-for-multiple-wordpress-websites)**
@@ -123,20 +123,20 @@ Adding to this, you can also use the same account on multiple applications and y
123
  * Monitoring current Google Authenticator and other two-factor authentication (2 Factor) method of all the users in the plugin
124
  * Session restriction
125
 
126
- = Add Ons for two-factor authentication ( WP 2FA/OTP ) =
127
 
128
- * RBA & Trusted Devices Management Add-on Features for two-factor authentication ( WP 2FA/OTP )
129
  * **Remember Device** to skip the two-factor authentication ( 2 Factor ) from the **trusted devices**.
130
  * Set **Device Limit** for the users to login
131
 
132
- * Personalization Add-on Features to customize your two-factor authentication pages
133
  * Custom UI of Two-Factor Authentication (WP 2FA/TFA) pop-ups
134
  * Custom Email and SMS Templates
135
  * Customize 'Powered by' Logo on wp 2fa authentication page
136
  * Customize Plugin Icon
137
  * Customize Plugin Name
138
 
139
- * Short Codes Add-on Features for two-factor authentication ( 2FA/MFA )
140
  * Turn on/off 2 factor (two-factor authentication) by user
141
  * Reconfigure 2fa methods
142
  * 'Enable Remember Device' from a custom login form to skip 2 factor for trusted devices.
@@ -145,9 +145,9 @@ Adding to this, you can also use the same account on multiple applications and y
145
  * [Device restriction with webauthn/ FIDO2](https://plugins.miniorange.com/passwordless-login-with-web-authentication-wordpress)
146
  Password free authentication is possible with WebAuthn.
147
 
148
- Check all the features other than two-factor authentication ( Two step verification ) here: [miniOrange Website](https://security.miniorange.com/)
149
 
150
- <h4>Useful blog posts about two-factor authentication ( 2FA/MFA ) plugin </h4>
151
  * [Beginner’s Guide: How to Add Two-Factor Authentication to WordPress](https://themeisle.com/blog/how-to-add-two-factor-authentication-to-wordpress/)
152
  * [How to Add WordPress Two-Factor Authentication (WP 2FA/TFA)](https://phppot.com/wordpress/how-to-add-wordpress-two-factor-authentication-2fa-using-google-authenticator-plugin/)
153
  * [How to translate WordPress Two-Factor Authentication (WP 2FA/TFA)](https://plugins.miniorange.com/the-plugin-translate-spanish-language-with-2-factor-wordpress)
@@ -170,6 +170,7 @@ Customized solutions and Active support are available. Email us at info@xecurify
170
 
171
  = Once Activated [Google Authenticator - Two Step Verification]=
172
  1. Select miniOrange 2-Factor ( 2 factor authentication ) from the left menu and follow the instructions.
 
173
  2. Once, you complete your setup. Click on the Log Out button.
174
  3. Enter the username and password. After the initial validation, you will be prompted for the 2-factor method you had set up.
175
  4. Validate yourself with the 2-factor authentication(WP 2FA/TFA) method you configured.
@@ -195,7 +196,7 @@ You can also check our video Tutorial:
195
 
196
  You can use google authenticator as the backup method for your specific user or all users in the premium version of the two-factor authentication. [PREMIUM FEATURE]
197
 
198
- = I have enabled Two-Factor Authentication (2FA/TFA) for all users, what happens if an end-user tries to login but has not yet registered? =
199
 
200
  If a user has not set up Two-Factor yet, the user has to register by inline registration that will be invoked during the login.
201
 
@@ -219,7 +220,7 @@ Our Two-Factor plugin is compatible with most of the security plugins, but if it
219
 
220
  If you are using Async JS and CSS Plugin. Please go to its settings and add jquery to the list of exceptions and save settings. It will work. If you are still not able to get it right, Please submit a query in our Support Section in the plugin or you can contact us at info@xecurify.com.
221
 
222
- = My phone has no internet connectivity and I am entering the one time passcode from miniOrange Authenticator App, it says Invalid OTP?
223
 
224
  Click on the <b>Settings Icon</b> on top right corner in <b>miniOrange Authenticator App</b> and then press <b>Sync button</b> under 'Time correction for codes' to sync your time with miniOrange Servers. If you still can't logged in then please email us at info@xecurify.com or <a href="https://miniorange.com/contact" target="_blank">Contact us</a>.Soft Token method is just like google authenticator method.
225
 
@@ -240,6 +241,10 @@ You should go to <b>Setup Two Factor (2FA) </b> Tab and click on <b>Reconfigure<
240
 
241
  == Changelog ==
242
 
 
 
 
 
243
  = 5.5.6 =
244
  * Google Authenticator - Two factor Authentication (2FA, OTP) :
245
  * Bug Fixes
@@ -273,6 +278,10 @@ For older changelog entries, please see the [additional changelog.txt file](http
273
 
274
  == Upgrade Notice ==
275
 
 
 
 
 
276
  = 5.5.1 =
277
  * Google Authenticator - Two factor Authentication (2FA, OTP) :
278
  * Updated Pricing page UI
1
  === miniOrange's Google Authenticator - WordPress Two Factor Authentication (2FA , Two Factor, OTP SMS and Email) | Passwordless login ===
2
 
3
  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 ,two step verification, TFA, mobile verification, MFA, Remember Device, OTP Over Telegram, Mobile Authentication, 2 step authentication, passwordless login, QR Code Authentication, email verification, KBA, Security Questions, login with SMS, Authy, Authy two factor , FIDO, FIDO2, Webauthn, multi factor, wordfence, IP Blocking, IP Whitelisting, SMS login, OTP Over SMS and Email, login without password, Mobile verification, password free authentication, session restriction.
5
  Donate link: https://miniorange.com/
6
  Requires at least: 3.0.1
7
  Tested up to: 6.0
8
  Requires PHP: 5.3.0
9
+ Stable tag: 5.5.7
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
13
+ Google Authenticator-multi Factor(WP 2FA / OTP) - Supports TOTP/OTP Login based methods like Duo/Google Authenticator along with OTP Over SMS/Email & more.
14
 
15
  == Description ==
16
 
17
+ **Google Authenticator - Two Factor (WP 2FA / OTP)** - Provides *secure login* to WordPress. This plugin can be configured for any **TOTP-based/OTP Login** methods like Duo/Microsoft/Google Authenticator. It supports OTP login based 2fa methods.
18
 
19
  You can check out following video to configure google authenticator as a two factor:
20
 
21
  [youtube https://youtu.be/_nkMCkxLcIs]
22
 
23
  = Trial for Google authenticator Premium and Enterprise plugin =
24
+ We do provide 7 days trial of our Google Authenticator Premium plugins. You can test all Premium features including 2fa methods/OTP authentication methods such as google authenticator, OTP Over SMS/Email.
25
 
26
  = [Google Authenticator - Two step verification/ 2 Factor Authentication/ WP 2FA] FREE Plugin Features =
27
  * Simplified & easy user interface to set up **Google Authenticator** and other Two-Factor Authentication ( WP 2FA/TFA/OTP ) methods.
29
  * QR Code authentication, Push Notification, Soft Token and Security Questions(KBA) are supported in the plugin for multi factor authentication(WP 2FA/TFA).
30
  * Includes Language Translation Support
31
  * **[User Profile 2fa](https://plugins.miniorange.com/how-to-set-up-2-factor-from-wordpress-user-profile-section):** Administrators can set up Two Factor (TFA)of users via WordPress users section
32
+ * **Multi Factor Authentication(MFA):** This feature can be used to invoke any two factor method on login among multiple methods which were configured. You can configure multiple TOTP/OTP Login based 2fa methods that can be used as a **backup 2fa method**
33
  * **Two-Factor Authentication** ( TFA/2FA ) for Ajax login forms like User Pro, login with ajax, Theme my login, etc with all authentication methods.
34
  * **Passwordless login** and login with phone number
35
+ * **[Prevent account sharing](https://security.miniorange.com/restricting-users-from-sharing-their-login-credentials/):** Google Authenticator(WP 2FA) is OTP login based method which restricts users from sharing WordPress login credentials which help to secure WordPress Websites. The Google authenticator plugin also adds a session control feature that limits user sessions based on WordPress User activities.
36
  * This plugin Supports standard TOTP
37
  * Two-Factor Authentication (WP 2FA/TFA) allows authentication on the login page itself for Google Authenticator & miniOrange Soft Token
38
  * **[Multiple Login Options](https://docs.miniorange.com/documentation/login-username-2nd-factor-2):** Username + password + two-factor (or) Username + two-factor i.e. Passwordless login /Login without password /Password free authentication
62
  * Reporting
63
  * Audit Log
64
 
65
+ = Apps Supported by the two-factor authentication (2FA / MFA) plugin =
66
  * Google Authenticator
67
  * miniOrange Authenticator
68
  * Duo Authenticator
72
  * FreeOTP Authenticator
73
 
74
  = User Identity Verification or multi-factor authentication with Google Authenticator =
75
+ **Login and Registration:** Verify users on login with different OTP Login methods & other two factor methods like OTP over SMS, OTP Over Email, OTP Over Telegram, Google Authenticator, SMS Verification, Email, Authy Authenticator, Duo Authenticator, Microsoft Authenticator, TOTP Based Authenticator, Security Questions, and many others.
76
+ Users will receive an OTP at the time of registration which will be used to verify their identity. OTP authentication can be done either via OTP Login methods(OTP Over email or via OTP over SMS).
77
 
78
+ = Plugin Integrations and Support for all methods of two-factor authentication/two step verification ( WP 2FA/TFA/OTP Authentication ) =
79
  Our plugin is integrated with [popular Plugins](https://plugins.miniorange.com/2-factor-authentication-for-wordpress-wp-2fa#integrations) such as WooCommerce and Ultimate member.
80
 
81
+ = Third Party Custom SMS Gateway for OTP Over SMS ( OTP Login/two-factor authentication / 2FA ) =
82
+ The premium plugin supports any third-party **custom SMS Gateway**. If you don't have your SMS gateway you can use miniOrange gateway and send SMS(OTP over SMS) all over the world for OTP authentication.
83
  [Here](https://plugins.miniorange.com/supported-sms-email-gateways) are some famous gateways supported for two factor (WP 2FA/TFA/OTP).
84
  [Test your Gateway](https://login.xecurify.com/moas/login?redirectUrl=https://login.xecurify.com/moas/admin/customer/smsconfig)
85
 
91
  = Google Authenticator ( WP 2FA - two-factor authentication ) Premium Lite Plugin Features =
92
 
93
  * Google Authenticator - Two-Factor Authentication (WP 2FA/TFA) for all users and all user roles *( Site-based pricing )*
94
+ * **Two-Factor Authentication Methods:** Google Authenticator, Authy Authenticator, Microsoft Authenticator, LastPass Authenticator, Security Questions(KBA), OTP Authentication( OTP Over Email & OTP Over SMS), Email Verification, Mobile Verification *( SMS credits need to be purchased as per the need)*
95
  * **[Multiple Login Options](https://docs.miniorange.com/documentation/login-username-2nd-factor-2):** Username + password + two-factor (or) Username + two-factor i.e. Passwordless login /Login without password /Password free authentication. With google authenticator plugin, the 2FA plugin user is authenticated directly with the second layer of security without entering the password. You can opt between a password and 2FA or only a second factor.
96
  * **Unlimited Email transactions:** miniOrange's google authenticator plugin provides unlimited Email transactions with your SMTP server
97
  * **Backup Method:** KBA(Security Questions), OTP Over Email, Backup codes if you are unable to validate two step verification
105
  * [Remember Device to skip 2fa](https://docs.miniorange.com/documentation/remember-my-device)
106
  * **Customizable Login UI Popup:** Using google authenticator plugin you can customize the user interface of the login popup as per your preference.
107
 
108
+ = Google Authenticator ( WP 2FA / OTP ) Enterprise Plugin Features =
109
 
110
  * [Google Authenticator - Two-Factor Authentication](https://plugins.miniorange.com/2-factor-authentication-for-wordpress) - 2FA for Users as per the upgrade *( User-based pricing )*
111
+ * **Available Authentication Methods:** Google Authenticator, Authy Authenticator, Microsoft Authenticator, LastPass Authenticator, QR Code, Push Notification, Soft Token, Security Questions(KBA), OTP Authentication(OTP Over Email, OTP Over SMS or OTP Over SMS and Email), Email Verification, Hardware Token. *( SMS and Email credits need to be purchased for successful OTP authentication as per the need)*
112
  * **Multiple Login Options:** Username + password + two-factor Authentication (or) Username + two-factor authentication(2FA) i.e. Passwordless login /Login without password /Password free authentication.
113
  * **Backup Methods:** KBA(Security Questions), OTP Over Email, Backup Codes
114
  * **[Sync 2fa for multiple websites](https://plugins.miniorange.com/two-factor-authentication-2fa-for-multiple-wordpress-websites)**
123
  * Monitoring current Google Authenticator and other two-factor authentication (2 Factor) method of all the users in the plugin
124
  * Session restriction
125
 
126
+ = Add Ons for two-factor authentication ( WP 2FA / OTP ) =
127
 
128
+ * RBA & Trusted Devices Management Add-on Features for two-factor authentication ( WP 2FA/OTP Login )
129
  * **Remember Device** to skip the two-factor authentication ( 2 Factor ) from the **trusted devices**.
130
  * Set **Device Limit** for the users to login
131
 
132
+ * Personalization Add-on Features to customize your two-factor authentication/OTP Authentication pages
133
  * Custom UI of Two-Factor Authentication (WP 2FA/TFA) pop-ups
134
  * Custom Email and SMS Templates
135
  * Customize 'Powered by' Logo on wp 2fa authentication page
136
  * Customize Plugin Icon
137
  * Customize Plugin Name
138
 
139
+ * Short Codes Add-on Features for two-factor authentication ( 2FA / MFA )
140
  * Turn on/off 2 factor (two-factor authentication) by user
141
  * Reconfigure 2fa methods
142
  * 'Enable Remember Device' from a custom login form to skip 2 factor for trusted devices.
145
  * [Device restriction with webauthn/ FIDO2](https://plugins.miniorange.com/passwordless-login-with-web-authentication-wordpress)
146
  Password free authentication is possible with WebAuthn.
147
 
148
+ Check all the features other than two-factor authentication ( Two step verification/OTP authentication ) here: [miniOrange Website](https://security.miniorange.com/)
149
 
150
+ <h4>Useful blog posts about two-factor authentication ( 2FA / MFA ) plugin </h4>
151
  * [Beginner’s Guide: How to Add Two-Factor Authentication to WordPress](https://themeisle.com/blog/how-to-add-two-factor-authentication-to-wordpress/)
152
  * [How to Add WordPress Two-Factor Authentication (WP 2FA/TFA)](https://phppot.com/wordpress/how-to-add-wordpress-two-factor-authentication-2fa-using-google-authenticator-plugin/)
153
  * [How to translate WordPress Two-Factor Authentication (WP 2FA/TFA)](https://plugins.miniorange.com/the-plugin-translate-spanish-language-with-2-factor-wordpress)
170
 
171
  = Once Activated [Google Authenticator - Two Step Verification]=
172
  1. Select miniOrange 2-Factor ( 2 factor authentication ) from the left menu and follow the instructions.
173
+ 2. Configure any 2 factor method, say Google Authenticator.
174
  2. Once, you complete your setup. Click on the Log Out button.
175
  3. Enter the username and password. After the initial validation, you will be prompted for the 2-factor method you had set up.
176
  4. Validate yourself with the 2-factor authentication(WP 2FA/TFA) method you configured.
196
 
197
  You can use google authenticator as the backup method for your specific user or all users in the premium version of the two-factor authentication. [PREMIUM FEATURE]
198
 
199
+ = I have enabled Two-Factor Authentication (2FA / TFA) for all users, what happens if an end-user tries to login but has not yet registered? =
200
 
201
  If a user has not set up Two-Factor yet, the user has to register by inline registration that will be invoked during the login.
202
 
220
 
221
  If you are using Async JS and CSS Plugin. Please go to its settings and add jquery to the list of exceptions and save settings. It will work. If you are still not able to get it right, Please submit a query in our Support Section in the plugin or you can contact us at info@xecurify.com.
222
 
223
+ = My phone has no internet connectivity and I am entering the one time passcode from miniOrange Authenticator App during OTP login, it says Invalid OTP?
224
 
225
  Click on the <b>Settings Icon</b> on top right corner in <b>miniOrange Authenticator App</b> and then press <b>Sync button</b> under 'Time correction for codes' to sync your time with miniOrange Servers. If you still can't logged in then please email us at info@xecurify.com or <a href="https://miniorange.com/contact" target="_blank">Contact us</a>.Soft Token method is just like google authenticator method.
226
 
241
 
242
  == Changelog ==
243
 
244
+ = 5.5.7 =
245
+ * Google Authenticator - Two factor Authentication (2FA, OTP) :
246
+ * Bug Fixes and Code Improvements
247
+
248
  = 5.5.6 =
249
  * Google Authenticator - Two factor Authentication (2FA, OTP) :
250
  * Bug Fixes
278
 
279
  == Upgrade Notice ==
280
 
281
+ = 5.5.7 =
282
+ * Google Authenticator - Two factor Authentication (2FA, OTP) :
283
+ * Bug Fixes and Code Improvements
284
+
285
  = 5.5.1 =
286
  * Google Authenticator - Two factor Authentication (2FA, OTP) :
287
  * Updated Pricing page UI
views/account/register.php CHANGED
@@ -50,7 +50,6 @@ echo'<!--Register with miniOrange-->
50
  value='. wp_create_nonce( "mo2f-goto-verifycustomer-nonce" ).' >
51
  </form>';
52
  ?>
53
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
54
 
55
  <script>
56
 
@@ -58,6 +57,5 @@ echo'<!--Register with miniOrange-->
58
  jQuery('.mo2f_verify_customerform').submit();
59
  });
60
 
61
-
62
-
63
  </script>
50
  value='. wp_create_nonce( "mo2f-goto-verifycustomer-nonce" ).' >
51
  </form>';
52
  ?>
 
53
 
54
  <script>
55
 
57
  jQuery('.mo2f_verify_customerform').submit();
58
  });
59
 
60
+
 
61
  </script>
views/advanced-blocking.php CHANGED
@@ -69,7 +69,7 @@ echo "</td><td>".date("M j, Y, g:i:s a",$blockedip->created_timestamp)."</td>
69
  <?php
70
  foreach($whitelisted_ips as $whitelisted_ip)
71
  {
72
- echo "<tr class='mo_wpns_not_bold'><td>".$whitelisted_ip->ip_address."</td><td>".date("M j, Y, g:i:s a",$whitelisted_ip->created_timestamp)."</td><td><a ".$disabled." onclick=removefromwhitelist('".$whitelisted_ip->id."')>Remove</a></td></tr>";
73
  }
74
 
75
  echo' </tbody>
69
  <?php
70
  foreach($whitelisted_ips as $whitelisted_ip)
71
  {
72
+ echo "<tr class='mo_wpns_not_bold'><td>".esc_attr($whitelisted_ip->ip_address)."</td><td>".date("M j, Y, g:i:s a",$whitelisted_ip->created_timestamp)."</td><td><a ".$disabled." onclick=removefromwhitelist('".$whitelisted_ip->id."')>Remove</a></td></tr>";
73
  }
74
 
75
  echo' </tbody>
views/backup/backup_setting_view.php CHANGED
@@ -58,7 +58,7 @@ function mo_backup_config_page_submit(){
58
  jQuery(document).ready(function(){
59
  jQuery('#save_backup_settings').click(function(){
60
 
61
- var message = "<?php echo esc_attr($filemessage); ?>";
62
  jQuery(".file_backup_desc").empty();
63
  jQuery(".file_backup_desc").append(message);
64
  jQuery(".file_backup_desc").slideDown(400);
58
  jQuery(document).ready(function(){
59
  jQuery('#save_backup_settings').click(function(){
60
 
61
+ var message = "<?php echo $filemessage; ?>";
62
  jQuery(".file_backup_desc").empty();
63
  jQuery(".file_backup_desc").append(message);
64
  jQuery(".file_backup_desc").slideDown(400);
views/change-password.php CHANGED
@@ -3,13 +3,13 @@
3
  echo' <html>
4
  <head>
5
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width, initial-scale=1">
7
 
8
- <link rel="stylesheet" type="text/css" href="' .$css_file. '" />
9
- <script src="'.$js_url.'"></script>
10
- <script src="' .$js_file. '"></script>
11
 
12
- </head>
13
  <body>
14
  <div class="mo-modal-backdrop">
15
  <div class="mo_wpns_modal" tabindex="-1" role="dialog">
3
  echo' <html>
4
  <head>
5
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">';
7
 
8
+ wp_print_styles( 'mo2f_seetings_style' );
9
+ wp_print_scripts('mo2f_setting_page_js');
10
+ wp_print_scripts( 'jquery' );
11
 
12
+ echo' </head>
13
  <body>
14
  <div class="mo-modal-backdrop">
15
  <div class="mo_wpns_modal" tabindex="-1" role="dialog">
views/common-elements.php CHANGED
@@ -18,9 +18,9 @@
18
  {
19
  echo "<tr><td>".$usertranscation->ip_address."</td><td>".$usertranscation->username."</td><td>";
20
  if($usertranscation->status==MoWpnsConstants::FAILED || $usertranscation->status==MoWpnsConstants::PAST_FAILED)
21
- echo "<span style=color:red>".MoWpnsConstants::FAILED."</span>";
22
  else if($usertranscation->status==MoWpnsConstants::SUCCESS)
23
- echo "<span style=color:green>".MoWpnsConstants::SUCCESS."</span>";
24
  else
25
  echo "N/A";
26
  echo "</td><td>".date("M j, Y, g:i:s a",$usertranscation->created_timestamp)."</td></tr>";
@@ -33,9 +33,9 @@
33
  {
34
  foreach($usertransactions as $usertranscation)
35
  {
36
- echo "<tr><td>".$usertranscation->ip_address."</td><td>".$usertranscation->username."</td>";
37
- echo "<td>".esc_url($usertranscation->url)."</td><td>".$usertranscation->type."</td>";
38
- echo "</td><td>".date("M j, Y, g:i:s a",$usertranscation->created_timestamp)."</td></tr>";
39
  }
40
  }
41
 
@@ -45,9 +45,9 @@
45
  function show_google_recaptcha_form_v3_login()
46
  {
47
  $site_k=get_option('mo_wpns_recaptcha_site_key_v3');
48
- ?>
49
- <script src='https://www.google.com/recaptcha/api.js?render=<?php echo get_option("mo_wpns_recaptcha_site_key_v3");?>'></script>
50
- <?php
51
  echo'
52
  <div class="g-recaptcha-response" data-sitekey="'.$site_k.'"></div>
53
  <input type="hidden" name="g-recaptcha-response" id="g-recaptcha-response">
@@ -72,7 +72,8 @@
72
  //Function to show google recaptcha v2 form
73
  function show_google_recaptcha_form_v2_login()
74
  {
75
- echo "<script src='".MoWpnsConstants::RECAPTCHA_URL."'></script>";
 
76
  echo '<div class="g-recaptcha" data-sitekey="'.get_option("mo_wpns_recaptcha_site_key").'"></div>';
77
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
78
  }
@@ -80,16 +81,20 @@
80
 
81
  function show_google_recaptcha_form_v2()
82
  {
83
-
84
- echo'
85
- <link rel="stylesheet" type="text/css" media="all" href="'.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"/>
86
- <style> .button.button-large { height: 30px; line-height: 28px; padding: 0 12px 2px; } .button-primary { background: #0085ba; border-color: #0073aa #006799 #006799; -webkit-box-shadow: 0 1px 0 #006799; box-shadow: 0 1px 0 #006799; color: #fff; text-decoration: none; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; border-radius: 3px; cursor: pointer; border-width: 1px; border-style: solid; font-size: 15px; width: 300px; } </style>
87
- <script src="'.MoWpnsConstants::RECAPTCHA_URL.'"></script>
88
- <div style="font-family:\'Open Sans\',sans-serif;margin:0px auto;width:303px;text-align:center;">
 
 
 
 
89
  <br><br><h2>Test google reCAPTCHA keys</h2>
90
  <form method="post">
91
  <div class="g-recaptcha" data-sitekey="'.get_option('mo_wpns_recaptcha_site_key').'"></div>
92
- <br><input class="button button-primary button-large" type="submit" value="Test Keys" class="button button-primary button-large">
93
  </form>
94
  </div>';
95
  exit();
@@ -100,22 +105,23 @@
100
 
101
  function show_google_recaptcha_form_v3()
102
  {
103
- $site_k=get_option('mo_wpns_recaptcha_site_key_v3');
104
- echo'
105
- <link rel="stylesheet" type="text/css" media="all" href="'.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"/>
106
- <style> .button.button-large { height: 30px; line-height: 28px; padding: 0 12px 2px; } .button-primary { background: #0085ba; border-color: #0073aa #006799 #006799; -webkit-box-shadow: 0 1px 0 #006799; box-shadow: 0 1px 0 #006799; color: #fff; text-decoration: none; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; border-radius: 3px; cursor: pointer; border-width: 1px; border-style: solid; font-size: 15px; width: 300px; } </style>';
107
- ?>
108
-
109
- <script src='https://www.google.com/recaptcha/api.js?render=<?php echo get_option("mo_wpns_recaptcha_site_key_v3");?>'></script>
110
-
111
- <?php
 
112
  echo'
113
  <div style="font-family:\'Open Sans\',sans-serif;margin:0px auto;width:303px;text-align:center;">
114
  <br><br><h2>Test google reCAPTCHA keys</h2>
115
  <form id="f1" method="post">
116
  <div class="g-recaptcha-response" data-sitekey="'.$site_k.'"></div>
117
  <input type="hidden" name="g-recaptcha-response" id="g-recaptcha-response">
118
- <br><input class="button button-primary button-large" type="submit" value="Test Keys" class="button button-primary button-large">
119
  </form>
120
  </div>
121
  </div>';
18
  {
19
  echo "<tr><td>".$usertranscation->ip_address."</td><td>".$usertranscation->username."</td><td>";
20
  if($usertranscation->status==MoWpnsConstants::FAILED || $usertranscation->status==MoWpnsConstants::PAST_FAILED)
21
+ echo "<span style=color:red>".esc_attr(MoWpnsConstants::FAILED)."</span>";
22
  else if($usertranscation->status==MoWpnsConstants::SUCCESS)
23
+ echo "<span style=color:green>".esc_attr(MoWpnsConstants::SUCCESS)."</span>";
24
  else
25
  echo "N/A";
26
  echo "</td><td>".date("M j, Y, g:i:s a",$usertranscation->created_timestamp)."</td></tr>";
33
  {
34
  foreach($usertransactions as $usertranscation)
35
  {
36
+ echo "<tr><td>".esc_attr($usertranscation->ip_address)."</td><td>".esc_attr($usertranscation->username)."</td>";
37
+ echo "<td>".esc_url($usertranscation->url)."</td><td>".esc_attr($usertranscation->type)."</td>";
38
+ echo "</td><td>".date("M j, Y, g:i:s a",esc_attr($usertranscation->created_timestamp))."</td></tr>";
39
  }
40
  }
41
 
45
  function show_google_recaptcha_form_v3_login()
46
  {
47
  $site_k=get_option('mo_wpns_recaptcha_site_key_v3');
48
+
49
+ wp_register_script( 'mo2f_recaptcha','https://www.google.com/recaptcha/api.js?render='.get_option("mo_wpns_recaptcha_site_key_v3"));
50
+ wp_enqueue_script('mo2f_recaptcha');
51
  echo'
52
  <div class="g-recaptcha-response" data-sitekey="'.$site_k.'"></div>
53
  <input type="hidden" name="g-recaptcha-response" id="g-recaptcha-response">
72
  //Function to show google recaptcha v2 form
73
  function show_google_recaptcha_form_v2_login()
74
  {
75
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
76
+ wp_enqueue_script( 'mo2f_catpcha_js' );
77
  echo '<div class="g-recaptcha" data-sitekey="'.get_option("mo_wpns_recaptcha_site_key").'"></div>';
78
  echo '<style>#login{ width:349px;padding:2% 0 0; }.g-recaptcha{margin-bottom:5%;}#registerform{padding-bottom:20px;}</style>';
79
  }
81
 
82
  function show_google_recaptcha_form_v2()
83
  {
84
+ 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"/>');
85
+ wp_register_style( 'mo2f_style_settings',plugins_url( 'includes/css/style_settings.css?version=5.5', dirname(__FILE__)));
86
+
87
+ wp_print_styles('mo2f_admin_css');
88
+ wp_print_styles( 'mo2f_style_settings' );
89
+
90
+ wp_register_script( 'mo2f_catpcha_js',esc_url(MoWpnsConstants::RECAPTCHA_URL));
91
+ wp_enqueue_script( 'mo2f_catpcha_js' );
92
+
93
+ echo '<div style="font-family:\'Open Sans\',sans-serif;margin:0px auto;width:303px;text-align:center;">
94
  <br><br><h2>Test google reCAPTCHA keys</h2>
95
  <form method="post">
96
  <div class="g-recaptcha" data-sitekey="'.get_option('mo_wpns_recaptcha_site_key').'"></div>
97
+ <br><input class="mo2f_test_captcha_button" type="submit" value="Test Keys" class="button button-primary button-large">
98
  </form>
99
  </div>';
100
  exit();
105
 
106
  function show_google_recaptcha_form_v3()
107
  {
108
+ $site_k=get_option('mo_wpns_recaptcha_site_key_v3');
109
+
110
+ 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"/>');
111
+ wp_register_style( 'mo2f_style_settings',plugins_url( 'includes/css/style_settings.css?version=5.5', dirname(__FILE__)));
112
+
113
+ wp_print_styles('mo2f_admin_css');
114
+ wp_print_styles( 'mo2f_style_settings' );
115
+
116
+ wp_register_script( 'mo2f_recaptcha','https://www.google.com/recaptcha/api.js?render='.get_option("mo_wpns_recaptcha_site_key_v3"));
117
+ wp_enqueue_script('mo2f_recaptcha');
118
  echo'
119
  <div style="font-family:\'Open Sans\',sans-serif;margin:0px auto;width:303px;text-align:center;">
120
  <br><br><h2>Test google reCAPTCHA keys</h2>
121
  <form id="f1" method="post">
122
  <div class="g-recaptcha-response" data-sitekey="'.$site_k.'"></div>
123
  <input type="hidden" name="g-recaptcha-response" id="g-recaptcha-response">
124
+ <br><input class="mo2f_test_captcha_button" type="submit" value="Test Keys" class="button button-primary button-large">
125
  </form>
126
  </div>
127
  </div>';
views/email-IPaddress.php CHANGED
@@ -1,10 +1,19 @@
1
  <?php
2
  function mo_IP_template()
3
  {
4
- global $moWpnsUtility;
5
  $IPaddress = $moWpnsUtility->get_client_ip();
6
  $IPaddress = sanitize_text_field( $IPaddress );
7
- $result=@json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$IPaddress),true);
 
 
 
 
 
 
 
 
 
8
  $ipLookUpTemplate = MoWpnsConstants::IP_LOOKUP_TEMPLATE;
9
  $hostname = get_site_url();
10
  $t= date("Y-m-d");
@@ -15,7 +24,6 @@ return '<!DOCTYPE html>
15
  <title></title>
16
  </head>
17
  <body style=background-color:#f6f4f4>
18
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
19
  <style>
20
  .mo_2fa_description
21
  {
@@ -151,9 +159,9 @@ return '<!DOCTYPE html>
151
  }
152
  </style>
153
  <div style="border: 2px solid black;">
154
- <center><img src="https://s3.amazonaws.com/Snowcovered_C_Images/40290_shield.png" alt="miniorange" width="350" height="175"></center>
155
  <div class="mo_2fa_description" ><center><h2> Dear Customer</h2></center>
156
- <h2>A new login to your account has been made from this IP Address '.$IPaddress.'. If you recently logged in and recognize the logged in location,you may disregard this email. If you did not recently log in, you should immediately change your password . Passwords should be unique and not used for any other sites or services.If not MFA enabled To further protect your account, consider configuring a multi-factor authentication method <a style="color: #000080"href="https://plugins.miniorange.com/2-factor-authentication-for-wordpress">See 2FA methods</a>.
157
  </h2>
158
  </div>
159
 
@@ -162,19 +170,19 @@ return '<!DOCTYPE html>
162
  <center> <table style="text-align: left;margin-top: -120;color:blue">
163
  <tr>
164
  <th><h2> IP ADDRESS </h2></th>
165
- <th><h2>:: '.$IPaddress.' </h2></th>
166
  </tr>
167
  <tr>
168
  <th><h2> WEBSITE </h2></th>
169
- <th><h2>:: '.$hostname.' </h2></th>
170
  </tr>
171
  <tr>
172
  <th><h2>LOGIN DATE </h2> </th>
173
- <th><h2>:: '.$t.'</h2> </th>
174
  </tr>
175
  <tr>
176
  <th><h2>LOGIN LOCATION</h2> </th>
177
- <th><h2>:: '.$result["geoplugin_city"].'/'.$result["geoplugin_countryName"].'</h2> </th>
178
 
179
  </tr>
180
  </table>
1
  <?php
2
  function mo_IP_template()
3
  {
4
+ global $moWpnsUtility,$imagePath;
5
  $IPaddress = $moWpnsUtility->get_client_ip();
6
  $IPaddress = sanitize_text_field( $IPaddress );
7
+ $result=wp_remote_get("http://www.geoplugin.net/json.gp?ip=".$IPaddress);
8
+
9
+
10
+ if( !is_wp_error( $result ) ) {
11
+ $result=wp_remote_retrieve_body( $result);
12
+ }
13
+
14
+ $mo2f_cityName=isset($result["geoplugin_city"])?$result["geoplugin_city"]:'-';
15
+ $mo2f_Country=isset($result["geoplugin_countryName"])?$result["geoplugin_countryName"]:'-';
16
+
17
  $ipLookUpTemplate = MoWpnsConstants::IP_LOOKUP_TEMPLATE;
18
  $hostname = get_site_url();
19
  $t= date("Y-m-d");
24
  <title></title>
25
  </head>
26
  <body style=background-color:#f6f4f4>
 
27
  <style>
28
  .mo_2fa_description
29
  {
159
  }
160
  </style>
161
  <div style="border: 2px solid black;">
162
+ <center><img src="'.$imagePath.'includes/images/40290_shield.png" alt="miniOrange 2FA" width="350" height="175"></center>
163
  <div class="mo_2fa_description" ><center><h2> Dear Customer</h2></center>
164
+ <h2>A new login to your account has been made from this IP Address '.esc_attr($IPaddress).'. If you recently logged in and recognize the logged in location,you may disregard this email. If you did not recently log in, you should immediately change your password . Passwords should be unique and not used for any other sites or services.If not MFA enabled To further protect your account, consider configuring a multi-factor authentication method <a style="color: #000080"href="https://plugins.miniorange.com/2-factor-authentication-for-wordpress">See 2FA methods</a>.
165
  </h2>
166
  </div>
167
 
170
  <center> <table style="text-align: left;margin-top: -120;color:blue">
171
  <tr>
172
  <th><h2> IP ADDRESS </h2></th>
173
+ <th><h2>:: '.esc_attr($IPaddress).' </h2></th>
174
  </tr>
175
  <tr>
176
  <th><h2> WEBSITE </h2></th>
177
+ <th><h2>:: '.esc_attr($hostname).' </h2></th>
178
  </tr>
179
  <tr>
180
  <th><h2>LOGIN DATE </h2> </th>
181
+ <th><h2>:: '.esc_attr($t).'</h2> </th>
182
  </tr>
183
  <tr>
184
  <th><h2>LOGIN LOCATION</h2> </th>
185
+ <th><h2>:: '.esc_attr($mo2f_cityName).'/'.esc_attr($mo2f_Country).'</h2> </th>
186
 
187
  </tr>
188
  </table>
views/ip-blocking.php CHANGED
@@ -68,7 +68,7 @@ echo' </tbody>
68
 
69
  foreach($whitelisted_ips as $whitelisted_ip)
70
  {
71
- echo "<tr><td>".$whitelisted_ip->ip_address."</td><td>".date("M j, Y, g:i:s a",$whitelisted_ip->created_timestamp)."</td><td><a onclick=removefromwhitelist('".$whitelisted_ip->id."')>Remove</a></td></tr>";
72
  }
73
 
74
  echo' </tbody>
@@ -98,11 +98,11 @@ echo' </tbody>
98
  });
99
  $("#iplookup").on("submit",function (e){
100
  $(".ip_lookup_desc").empty();
101
- $(".ip_lookup_desc").append("<img src='.$img_loader_url.'>");
102
  $(".ip_lookup_desc").slideDown(400);
103
  var inputs = $("#lookupip").val();
104
  $.ajax({
105
- url: "'.$page_url.'",
106
  type: "GET",
107
  data: "option=iplookup&ip=" + inputs,
108
  crossDomain: !0,
68
 
69
  foreach($whitelisted_ips as $whitelisted_ip)
70
  {
71
+ echo "<tr><td>".esc_attr($whitelisted_ip->ip_address)."</td><td>".date("M j, Y, g:i:s a",esc_attr($whitelisted_ip->created_timestamp))."</td><td><a onclick=removefromwhitelist('".esc_attr($whitelisted_ip->id)."')>Remove</a></td></tr>";
72
  }
73
 
74
  echo' </tbody>
98
  });
99
  $("#iplookup").on("submit",function (e){
100
  $(".ip_lookup_desc").empty();
101
+ $(".ip_lookup_desc").append("<img src='.esc_url($img_loader_url).'>");
102
  $(".ip_lookup_desc").slideDown(400);
103
  var inputs = $("#lookupip").val();
104
  $.ajax({
105
+ url: "'.esc_url_raw($page_url).'",
106
  type: "GET",
107
  data: "option=iplookup&ip=" + inputs,
108
  crossDomain: !0,
views/malware_scanner/scan_report_view.php CHANGED
@@ -52,7 +52,7 @@ function show_scan_details($detailreport, $result, $ignorefiles, $last_scan){
52
  $filename = $report->filename;
53
 
54
  if(isset($issues['scan'])){
55
- echo "<tr><td style=text-align:center>".$filename."</td><td>";
56
  $t= htmlspecialchars($issues['scan']);
57
  echo '<div><span class="issue mmp_point">Details</span><div class="issuecontent hidden" data-content=""></div></div>';
58
  }
@@ -68,7 +68,7 @@ function show_scan_details($detailreport, $result, $ignorefiles, $last_scan){
68
  $repochekcount = 0;
69
  $net_connectivity = $record->net_connection;
70
  if($record->repo_issues < 0){
71
- echo "<div style='margin: 5px 0; border: 1px solid; border-radius: 5px; padding: 10px'><div><b style='color: orange; font-size: medium'>".$repo_status_code[$record->repo_issues]."</b>";
72
  echo "<input id='repo_button' class='mmp_green' type='button' name='repo_button' value='Show more' style='float:right'></div>";
73
  }else{
74
  foreach($detailreport as $report){
@@ -104,7 +104,7 @@ function show_scan_details($detailreport, $result, $ignorefiles, $last_scan){
104
  $filename = $report->filename;
105
 
106
  if(isset($issues['repo'])){
107
- echo "<tr><td style=text-align:center>".$filename."</td><td>";
108
  $t= htmlspecialchars($issues['repo']['exist']);
109
  echo '<div><span class="issue mmp_point" onclick="mo_wpns_show_details(this)">Details</span><div class="issuecontent hidden" data-content="'.$t.'"></div></div>';
110
  }
@@ -180,10 +180,10 @@ function show_scan_details($detailreport, $result, $ignorefiles, $last_scan){
180
  <tbody>
181
  <?php
182
  if($file_size_excess){
183
- echo "<tr><td style=text-align:center>Files size more than the threshold</td><td>".$file_size_excess." such files found</td></tr>";
184
  }
185
  if($files_skipped){
186
- echo "<tr><td style=text-align:center>Images(png,jpg,jpeg), Compressed Files(zip,rar)</td><td>".$files_skipped." such files found</td></tr>";
187
  }
188
  if($download_issue){
189
  echo "<tr><td style=text-align:center>Issues in downloading from repository</td><td>";
@@ -229,7 +229,7 @@ function show_scan_report($currenturl, $result){
229
  $report->scan_mode="Custom Scan";
230
  }
231
  $repo_count = $report->repo_issues >= 0 ? $report->repo_issues : 0;
232
- echo "<tr><td style=text-align:center>".$report->scan_mode."</td>";
233
  echo "<td style=text-align:center>";
234
  if(!empty($report->scanned_folders)){
235
  foreach(explode(";",$report->scanned_folders) as $folder){
@@ -239,14 +239,14 @@ function show_scan_report($currenturl, $result){
239
  }
240
  }
241
  echo "</td><td style=text-align:center>";
242
- echo "<span style=color:green id=scan_files>".$report->scanned_files." files scanned<br></span>";
243
- echo "<span style=color:red id=malicious_files>".$report->malware_count." malware found<br></span>";
244
  if($report->repo_issues < 0){
245
  echo "<span style=color:orange id=malicious_files>Issues with repository check<br></span>";
246
  }
247
- echo "<span style=color:orange id=warning_files>".($repo_count+$report->malicious_links)." warnings found</span>";
248
  echo "</td><td style=text-align:center id=start_time>".date("M j, Y, g:i:s a",$report->start_timestamp)."</td>";
249
- echo "<td><a href='".add_query_arg( array('tab' => 'default', 'view' => $report->id), $currenturl )."'>View Details</a> <a href='".add_query_arg( array('tab' => 'default', 'delete' => $report->id), $currenturl )."'>Delete</a></td>";
250
  echo "</tr>";
251
 
252
  }
52
  $filename = $report->filename;
53
 
54
  if(isset($issues['scan'])){
55
+ echo "<tr><td style=text-align:center>".esc_html($filename)."</td><td>";
56
  $t= htmlspecialchars($issues['scan']);
57
  echo '<div><span class="issue mmp_point">Details</span><div class="issuecontent hidden" data-content=""></div></div>';
58
  }
68
  $repochekcount = 0;
69
  $net_connectivity = $record->net_connection;
70
  if($record->repo_issues < 0){
71
+ echo "<div style='margin: 5px 0; border: 1px solid; border-radius: 5px; padding: 10px'><div><b style='color: orange; font-size: medium'>".esc_html($repo_status_code[$record->repo_issues])."</b>";
72
  echo "<input id='repo_button' class='mmp_green' type='button' name='repo_button' value='Show more' style='float:right'></div>";
73
  }else{
74
  foreach($detailreport as $report){
104
  $filename = $report->filename;
105
 
106
  if(isset($issues['repo'])){
107
+ echo "<tr><td style=text-align:center>".esc_html($filename)."</td><td>";
108
  $t= htmlspecialchars($issues['repo']['exist']);
109
  echo '<div><span class="issue mmp_point" onclick="mo_wpns_show_details(this)">Details</span><div class="issuecontent hidden" data-content="'.$t.'"></div></div>';
110
  }
180
  <tbody>
181
  <?php
182
  if($file_size_excess){
183
+ echo "<tr><td style=text-align:center>Files size more than the threshold</td><td>".esc_html($file_size_excess)." such files found</td></tr>";
184
  }
185
  if($files_skipped){
186
+ echo "<tr><td style=text-align:center>Images(png,jpg,jpeg), Compressed Files(zip,rar)</td><td>".esc_html($files_skipped)." such files found</td></tr>";
187
  }
188
  if($download_issue){
189
  echo "<tr><td style=text-align:center>Issues in downloading from repository</td><td>";
229
  $report->scan_mode="Custom Scan";
230
  }
231
  $repo_count = $report->repo_issues >= 0 ? $report->repo_issues : 0;
232
+ echo "<tr><td style=text-align:center>".esc_html($report->scan_mode)."</td>";
233
  echo "<td style=text-align:center>";
234
  if(!empty($report->scanned_folders)){
235
  foreach(explode(";",$report->scanned_folders) as $folder){
239
  }
240
  }
241
  echo "</td><td style=text-align:center>";
242
+ echo "<span style=color:green id=scan_files>".esc_html($report->scanned_files)." files scanned<br></span>";
243
+ echo "<span style=color:red id=malicious_files>".esc_html($report->malware_count)." malware found<br></span>";
244
  if($report->repo_issues < 0){
245
  echo "<span style=color:orange id=malicious_files>Issues with repository check<br></span>";
246
  }
247
+ echo "<span style=color:orange id=warning_files>".esc_html($repo_count+$report->malicious_links)." warnings found</span>";
248
  echo "</td><td style=text-align:center id=start_time>".date("M j, Y, g:i:s a",$report->start_timestamp)."</td>";
249
+ echo "<td><a href='".add_query_arg( array('tab' => 'default', 'view' => $report->id), esc_url($currenturl) )."'>View Details</a> <a href='".add_query_arg( array('tab' => 'default', 'delete' => $report->id), $currenturl )."'>Delete</a></td>";
250
  echo "</tr>";
251
 
252
  }
views/support.php CHANGED
@@ -5,7 +5,6 @@ echo '
5
 
6
  <meta charset="UTF-8">
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
9
  <div class="mo2f_table_layout_support">
10
  <div class="mo2f-support-form-flex">
11
  <div style="display flex; flex-direction: column; align-items:center;justify-content:center;padding 5px;">
5
 
6
  <meta charset="UTF-8">
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
8
  <div class="mo2f_table_layout_support">
9
  <div class="mo2f-support-form-flex">
10
  <div style="display flex; flex-direction: column; align-items:center;justify-content:center;padding 5px;">
views/twofa/setup/setup_duo_authenticator.php CHANGED
@@ -7,7 +7,7 @@ function mo2f_configure_duo_authenticator( $user ) {
7
 
8
  ?>
9
 
10
- <?php if(isset($_POST['option']) && $_POST['option'] == 'duo_mobile_send_push_notification_inside_plugin'){
11
  mo2f_setup_duo_authenticator(); //4
12
  }else if(get_user_meta($user->ID,'user_not_enroll')){
13
  mo2f_inside_plugin_go_for_user_enroll_on_duo($user);// 3 //initialize_duo_mobile_registration($user);
7
 
8
  ?>
9
 
10
+ <?php if(isset($_POST['option']) && sanitize_text_field(wp_unslash($_POST['option'])) == 'duo_mobile_send_push_notification_inside_plugin'){
11
  mo2f_setup_duo_authenticator(); //4
12
  }else if(get_user_meta($user->ID,'user_not_enroll')){
13
  mo2f_inside_plugin_go_for_user_enroll_on_duo($user);// 3 //initialize_duo_mobile_registration($user);
views/twofa/two_fa_setup_notification.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
 
3
  function mo2f_display_test_2fa_notification( $user ) {
 
4
  global $Mo2fdbQueries, $mo2f_dirName;
5
  $mo2f_configured_2FA_method = $Mo2fdbQueries->get_user_detail( 'mo2f_configured_2FA_method', $user->ID );
6
 
@@ -19,8 +20,9 @@ function mo2f_display_test_2fa_notification( $user ) {
19
  }
20
 
21
  }
 
 
22
  ?>
23
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
24
  <div id="twoFAtestAlertModal" class="modal" role="dialog">
25
  <div class="mo2f_modal-dialog">
26
  <!-- Modal content-->
1
  <?php
2
 
3
  function mo2f_display_test_2fa_notification( $user ) {
4
+
5
  global $Mo2fdbQueries, $mo2f_dirName;
6
  $mo2f_configured_2FA_method = $Mo2fdbQueries->get_user_detail( 'mo2f_configured_2FA_method', $user->ID );
7
 
20
  }
21
 
22
  }
23
+
24
+ wp_print_scripts( 'jquery' );
25
  ?>
 
26
  <div id="twoFAtestAlertModal" class="modal" role="dialog">
27
  <div class="mo2f_modal-dialog">
28
  <!-- Modal content-->
views/upgrade.php CHANGED
@@ -170,32 +170,38 @@ echo '
170
  ?>
171
  <br><br>
172
 
 
 
 
 
 
 
 
173
  <?php
174
  if( get_option("mo_wpns_2fa_with_network_security"))
175
  {
176
- ?>
177
- <div class="mo_upgrade_toggle">
178
- <p class="mo_upgrade_toggle_2fa">
179
- <input type="radio" name="sitetype" value="Recharge" id="mo2f_2fa_plans" onclick="show_2fa_plans();" style="display: none;">
180
- <label for="mo2f_2fa_plans" class="mo2f_upgrade_toggle_lable" id="mo_2fa_lite_licensing_plans_title" style="display: none;">&nbsp;&nbsp;&nbsp;2-Factor Authentication</label>
181
- <label for="mo2f_2fa_plans" class="mo2f_upgrade_toggle_lable mo2f_active_plan" id="mo_2fa_lite_licensing_plans_title1" style="display: block;">&nbsp;&nbsp;&nbsp;2-Factor Authentication</label>
182
- <input type="radio" name="sitetype" value="Recharge" id="mo2f_ns_plans" onclick="mo_ns_show_plans();" style="display: none;">
183
- <label for="mo2f_ns_plans" class="mo2f_upgrade_toggle_lable" id="mo2f_ns_licensing_plans_title">Website Security</label>
184
- <label for="mo2f_ns_plans" class="mo2f_upgrade_toggle_lable mo2f_active_plan" id="mo_ns_licensing_plans_title1" style="display: none;">Website Security</label>
185
- </p>
186
- </div>
187
- <?php
188
  }
189
  ?>
190
  <span class="cd-switch"></span>
191
 
192
 
193
  <br><br>
194
- <link rel="stylesheet" href=<?php echo $mainDir.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'css'.DIRECTORY_SEPARATOR.'upgrade.css';?>>
195
 
196
  <div class="mo2f_upgrade_super_div" id="mo2f_twofa_plans">
197
  <div class="mo2f_upgrade_main_div">
198
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"/>
199
  <div id="mofa_pricing_tabs_mo" class="mo2fa_pricing_tabs_mo mo2fa_pricing_tabs_mo_premium_lite">
200
  <div class="mo2fa_pricing_head_blue">
201
  <div id="mo2fa_pricing_head" class="mo2fa_pricing_head_supporter"><center><h3 class="mo2fa_pricing_head_mo_2fa">Unlimited Users<br>&nbsp;&nbsp;&nbsp;Essential 2FA <i class="mo2fa_tooltip fa fa-info-circle" aria-hidden="true"><span class="mo2fa_tooltiptext">
@@ -313,7 +319,6 @@ Role-Based Authentication
313
 
314
 
315
  <div class="mo2f_upgrade_main_div" id="mo2f_upgrade_main_div">
316
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
317
 
318
  <div id="mofa_pricing_tabs_mo" class="mo2fa_pricing_tabs_mo mo2fa_pricing_tabs_mo_premium">
319
  <div class="mo2fa_pricing_head_blue">
@@ -441,7 +446,6 @@ Addons
441
  </div>
442
 
443
  <div class="mo2f_upgrade_main_div">
444
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
445
 
446
  <div id="mofa_pricing_tabs_mo" class="mo2fa_pricing_tabs_mo mo2fa_pricing_tabs_mo_enterprise">
447
  <div class="mo2fa_pricing_head_sky">
@@ -1278,9 +1282,9 @@ function mo2f_scanner_yearly_standard_pricing() {
1278
  function mo2f_get_binary_equivalent_2fa_lite( $mo2f_var ) {
1279
  switch ( $mo2f_var ) {
1280
  case 1:
1281
- return "<div style='color: #20b2aa;font-size: x-large;float:left;margin:0px 5px;'>🗸</div>";
1282
  case 0:
1283
- return "<div style='color: red;font-size: x-large;float:left;margin:0px 5px;'>×</div>";
1284
  default:
1285
  return $mo2f_var;
1286
  }
@@ -1372,12 +1376,3 @@ function mo2f_feature_on_hover_2fa_upgrade( $mo2f_var ) {
1372
  }
1373
 
1374
  </script>
1375
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
1376
- <script>
1377
- $(document).ready(function(){
1378
-
1379
-
1380
-
1381
-
1382
- });
1383
- </script>
170
  ?>
171
  <br><br>
172
 
173
+ <?php
174
+ wp_register_style('mo2f_upgrade_css',$mainDir.'/includes/css/upgrade.css' );
175
+ wp_register_style('mo2f_font_awesome',"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css");
176
+ wp_enqueue_style('mo2f_upgrade_css' );
177
+ wp_enqueue_style('mo2f_font_awesome' );
178
+ ?>
179
+
180
  <?php
181
  if( get_option("mo_wpns_2fa_with_network_security"))
182
  {
183
+ ?>
184
+ <div class="mo_upgrade_toggle">
185
+ <p class="mo_upgrade_toggle_2fa">
186
+ <input type="radio" name="sitetype" value="Recharge" id="mo2f_2fa_plans" onclick="show_2fa_plans();" style="display: none;">
187
+ <label for="mo2f_2fa_plans" class="mo2f_upgrade_toggle_lable" id="mo_2fa_lite_licensing_plans_title" style="display: none;">&nbsp;&nbsp;&nbsp;2-Factor Authentication</label>
188
+ <label for="mo2f_2fa_plans" class="mo2f_upgrade_toggle_lable mo2f_active_plan" id="mo_2fa_lite_licensing_plans_title1" style="display: block;">&nbsp;&nbsp;&nbsp;2-Factor Authentication</label>
189
+ <input type="radio" name="sitetype" value="Recharge" id="mo2f_ns_plans" onclick="mo_ns_show_plans();" style="display: none;">
190
+ <label for="mo2f_ns_plans" class="mo2f_upgrade_toggle_lable" id="mo2f_ns_licensing_plans_title">Website Security</label>
191
+ <label for="mo2f_ns_plans" class="mo2f_upgrade_toggle_lable mo2f_active_plan" id="mo_ns_licensing_plans_title1" style="display: none;">Website Security</label>
192
+ </p>
193
+ </div>
194
+ <?php
195
  }
196
  ?>
197
  <span class="cd-switch"></span>
198
 
199
 
200
  <br><br>
 
201
 
202
  <div class="mo2f_upgrade_super_div" id="mo2f_twofa_plans">
203
  <div class="mo2f_upgrade_main_div">
204
+
205
  <div id="mofa_pricing_tabs_mo" class="mo2fa_pricing_tabs_mo mo2fa_pricing_tabs_mo_premium_lite">
206
  <div class="mo2fa_pricing_head_blue">
207
  <div id="mo2fa_pricing_head" class="mo2fa_pricing_head_supporter"><center><h3 class="mo2fa_pricing_head_mo_2fa">Unlimited Users<br>&nbsp;&nbsp;&nbsp;Essential 2FA <i class="mo2fa_tooltip fa fa-info-circle" aria-hidden="true"><span class="mo2fa_tooltiptext">
319
 
320
 
321
  <div class="mo2f_upgrade_main_div" id="mo2f_upgrade_main_div">
 
322
 
323
  <div id="mofa_pricing_tabs_mo" class="mo2fa_pricing_tabs_mo mo2fa_pricing_tabs_mo_premium">
324
  <div class="mo2fa_pricing_head_blue">
446
  </div>
447
 
448
  <div class="mo2f_upgrade_main_div">
 
449
 
450
  <div id="mofa_pricing_tabs_mo" class="mo2fa_pricing_tabs_mo mo2fa_pricing_tabs_mo_enterprise">
451
  <div class="mo2fa_pricing_head_sky">
1282
  function mo2f_get_binary_equivalent_2fa_lite( $mo2f_var ) {
1283
  switch ( $mo2f_var ) {
1284
  case 1:
1285
+ return "<div style='color: #20b2aa;font-size: x-large;float:left;margin:0px 5px;'>🗸</div>";
1286
  case 0:
1287
+ return "<div style='color: red;font-size: x-large;float:left;margin:0px 5px;'>×</div>";
1288
  default:
1289
  return $mo2f_var;
1290
  }
1376
  }
1377
 
1378
  </script>