SiteGuard WP Plugin - Version 1.1.2

Version Description

  • Supported with WP 4.1
  • Disabling the Admin IP Filter function by default
Download this release

Release Info

Developer jp-secure
Plugin Icon 128x128 SiteGuard WP Plugin
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.1.2

admin/siteguard-menu-admin-filter.php CHANGED
@@ -27,8 +27,8 @@ class SiteGuard_Menu_Admin_Filter extends SiteGuard_Base {
27
  $opt_val_exclude = $this->cvt_camma2ret( $config->get( $opt_name_exclude ) );
28
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-admin-filter-submit' ) ) {
29
  $error = false;
30
- if ( '1' == $_POST[ $opt_name_feature ] && $this->check_module( 'rewrite' ) == false ) {
31
- echo '<div class="error settings-error"><p><strong>';
32
  esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
33
  echo '</strong></p></div>';
34
  $error = true;
@@ -38,7 +38,7 @@ class SiteGuard_Menu_Admin_Filter extends SiteGuard_Base {
38
  $opt_val_feature = '0';
39
  }
40
  if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
41
- echo '<div class="error settings-error"><p><strong>';
42
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
43
  echo '</strong></p></div>';
44
  $error = true;
@@ -82,7 +82,7 @@ class SiteGuard_Menu_Admin_Filter extends SiteGuard_Base {
82
  </li>
83
  </ul>
84
  <?php
85
- echo '<p class="description">';
86
  esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
87
  echo '</p>';
88
  ?>
27
  $opt_val_exclude = $this->cvt_camma2ret( $config->get( $opt_name_exclude ) );
28
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-admin-filter-submit' ) ) {
29
  $error = false;
30
+ if ( '1' == $_POST[ $opt_name_feature ] && false == $this->check_module( 'rewrite' ) ) {
31
+ echo '<div class="error settings-error"><p><strong>';
32
  esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
33
  echo '</strong></p></div>';
34
  $error = true;
38
  $opt_val_feature = '0';
39
  }
40
  if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
41
+ echo '<div class="error settings-error"><p><strong>';
42
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
43
  echo '</strong></p></div>';
44
  $error = true;
82
  </li>
83
  </ul>
84
  <?php
85
+ echo '<p class="description">';
86
  esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
87
  echo '</p>';
88
  ?>
admin/siteguard-menu-captcha.php CHANGED
@@ -40,7 +40,7 @@ class SiteGuard_Menu_CAPTCHA extends SiteGuard_Base {
40
  || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_comment ] ) )
41
  || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_lostpassword ] ) )
42
  || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_registuser ] ) ) ) {
43
- echo '<div class="error settings-error"><p><strong>';
44
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
45
  echo '</strong></p></div>';
46
  $error = true;
@@ -81,7 +81,7 @@ class SiteGuard_Menu_CAPTCHA extends SiteGuard_Base {
81
  <label for="<?php echo $opt_name_enable.'_off' ?>"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
82
  </li>
83
  </ul>
84
- <?php
85
  $error = $captcha->check_requirements( );
86
  if ( is_wp_error( $error ) ) {
87
  echo '<p class="description">';
@@ -146,7 +146,7 @@ class SiteGuard_Menu_CAPTCHA extends SiteGuard_Base {
146
  <input type="hidden" name="update" value="Y">
147
  <hr />
148
 
149
- <?php
150
  wp_nonce_field( 'siteguard-menu-captcha-submit' );
151
  submit_button();
152
  ?>
40
  || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_comment ] ) )
41
  || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_lostpassword ] ) )
42
  || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_registuser ] ) ) ) {
43
+ echo '<div class="error settings-error"><p><strong>';
44
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
45
  echo '</strong></p></div>';
46
  $error = true;
81
  <label for="<?php echo $opt_name_enable.'_off' ?>"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
82
  </li>
83
  </ul>
84
+ <?php
85
  $error = $captcha->check_requirements( );
86
  if ( is_wp_error( $error ) ) {
87
  echo '<p class="description">';
146
  <input type="hidden" name="update" value="Y">
147
  <hr />
148
 
149
+ <?php
150
  wp_nonce_field( 'siteguard-menu-captcha-submit' );
151
  submit_button();
152
  ?>
admin/siteguard-menu-dashboard.php CHANGED
@@ -24,9 +24,9 @@ class SiteGuard_Menu_Dashboard extends SiteGuard_Base {
24
  echo '<div class="wrap">';
25
  echo '<img src="' . $img_path . 'sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
26
  echo '<h2>' . esc_html__( 'Dashboard', 'siteguard' ) . "</h2>\n";
27
- echo '<div class="siteguard-description">'
28
- . esc_html__( 'You can find docs, FAQ and more detailed information about SiteGuard WP Plugin on ', 'siteguard' )
29
- . '<a href="' . esc_html__('http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index_en.html', 'siteguard' ) . '" target="_blank">' . esc_html__('SiteGuard WP Plugin Page', 'siteguard') . '</a>' . esc_html__( '.', 'siteguard' ) . '</div>';
30
  echo '<h3>' . esc_html__( 'Setting status', 'siteguard' ) . "</h3>\n";
31
  ?>
32
  <table class="siteguard-form-table">
24
  echo '<div class="wrap">';
25
  echo '<img src="' . $img_path . 'sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
26
  echo '<h2>' . esc_html__( 'Dashboard', 'siteguard' ) . "</h2>\n";
27
+ echo '<div class="siteguard-description">'
28
+ . esc_html__( 'You can find docs, FAQ and more detailed information about SiteGuard WP Plugin on ', 'siteguard' )
29
+ . '<a href="' . esc_html__( 'http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index_en.html', 'siteguard' ) . '" target="_blank">' . esc_html__( 'SiteGuard WP Plugin Page', 'siteguard' ) . '</a>' . esc_html__( '.', 'siteguard' ) . '</div>';
30
  echo '<h3>' . esc_html__( 'Setting status', 'siteguard' ) . "</h3>\n";
31
  ?>
32
  <table class="siteguard-form-table">
admin/siteguard-menu-disable-pingback.php CHANGED
@@ -12,7 +12,7 @@ class SiteGuard_Menu_Disable_Pingback extends SiteGuard_Base {
12
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-disable-pingback-submit' ) ) {
13
  $error = false;
14
  if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
15
- echo '<div class="error settings-error"><p><strong>';
16
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
17
  echo '</strong></p></div>';
18
  $error = true;
@@ -54,7 +54,7 @@ class SiteGuard_Menu_Disable_Pingback extends SiteGuard_Base {
54
  <?php esc_html_e( 'The pingback function is disabled and its abuse is prevented.', 'siteguard' ) ?>
55
  </div>
56
  <hr />
57
- <?php
58
  wp_nonce_field( 'siteguard-menu-disable-pingback-submit' );
59
  submit_button( );
60
  ?>
12
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-disable-pingback-submit' ) ) {
13
  $error = false;
14
  if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
15
+ echo '<div class="error settings-error"><p><strong>';
16
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
17
  echo '</strong></p></div>';
18
  $error = true;
54
  <?php esc_html_e( 'The pingback function is disabled and its abuse is prevented.', 'siteguard' ) ?>
55
  </div>
56
  <hr />
57
+ <?php
58
  wp_nonce_field( 'siteguard-menu-disable-pingback-submit' );
59
  submit_button( );
60
  ?>
admin/siteguard-menu-fail-once.php CHANGED
@@ -15,7 +15,7 @@ class SiteGuard_Menu_Fail_Once extends SiteGuard_Base {
15
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-fail-once-submit' ) ) {
16
  $error = false;
17
  if ( false == $this->is_switch_value( $_POST[ $opt_name_fail_once ] ) ) {
18
- echo '<div class="error settings-error"><p><strong>';
19
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
20
  echo '</strong></p></div>';
21
  $error = true;
@@ -70,7 +70,7 @@ class SiteGuard_Menu_Fail_Once extends SiteGuard_Base {
70
  </div>
71
  <hr />
72
 
73
- <?php
74
  wp_nonce_field( 'siteguard-menu-fail-once-submit' );
75
  submit_button( );
76
  ?>
15
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-fail-once-submit' ) ) {
16
  $error = false;
17
  if ( false == $this->is_switch_value( $_POST[ $opt_name_fail_once ] ) ) {
18
+ echo '<div class="error settings-error"><p><strong>';
19
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
20
  echo '</strong></p></div>';
21
  $error = true;
70
  </div>
71
  <hr />
72
 
73
+ <?php
74
  wp_nonce_field( 'siteguard-menu-fail-once-submit' );
75
  submit_button( );
76
  ?>
admin/siteguard-menu-init.php CHANGED
@@ -2,7 +2,7 @@
2
  class SiteGuard_Menu_INIT extends SiteGuard_Base {
3
  function __construct( ) {
4
  add_action( 'admin_menu', array( &$this, 'add_pages' ) );
5
- if ( isset( $_GET['page'] ) && strpos( $_GET['page'], 'siteguard' ) !== false ) {
6
  add_action( 'admin_print_styles', array( $this, 'menu_styles' ) );
7
  }
8
  }
2
  class SiteGuard_Menu_INIT extends SiteGuard_Base {
3
  function __construct( ) {
4
  add_action( 'admin_menu', array( &$this, 'add_pages' ) );
5
+ if ( isset( $_GET['page'] ) && false !== strpos( $_GET['page'], 'siteguard' ) ) {
6
  add_action( 'admin_print_styles', array( $this, 'menu_styles' ) );
7
  }
8
  }
admin/siteguard-menu-login-alert.php CHANGED
@@ -19,7 +19,7 @@ class SiteGuard_Menu_Login_Alert extends SiteGuard_Base {
19
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-login-alert-submit' ) ) {
20
  $error = false;
21
  if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
22
- echo '<div class="error settings-error"><p><strong>';
23
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
24
  echo '</strong></p></div>';
25
  $error = true;
@@ -28,11 +28,11 @@ class SiteGuard_Menu_Login_Alert extends SiteGuard_Base {
28
  $opt_val_feature = $_POST[ $opt_name_feature ];
29
  $opt_val_subject = $_POST[ $opt_name_subject ];
30
  $opt_val_body = $_POST[ $opt_name_body ];
31
- if ( isset( $_POST[ $opt_name_admin ] ) ) {
32
- $opt_val_admin = $_POST[ $opt_name_admin ];
33
- } else {
34
- $opt_val_admin = '0';
35
- }
36
  $config->set( $opt_name_feature, $opt_val_feature );
37
  $config->set( $opt_name_subject, $opt_val_subject );
38
  $config->set( $opt_name_body, $opt_val_body );
19
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-login-alert-submit' ) ) {
20
  $error = false;
21
  if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
22
+ echo '<div class="error settings-error"><p><strong>';
23
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
24
  echo '</strong></p></div>';
25
  $error = true;
28
  $opt_val_feature = $_POST[ $opt_name_feature ];
29
  $opt_val_subject = $_POST[ $opt_name_subject ];
30
  $opt_val_body = $_POST[ $opt_name_body ];
31
+ if ( isset( $_POST[ $opt_name_admin ] ) ) {
32
+ $opt_val_admin = $_POST[ $opt_name_admin ];
33
+ } else {
34
+ $opt_val_admin = '0';
35
+ }
36
  $config->set( $opt_name_feature, $opt_val_feature );
37
  $config->set( $opt_name_subject, $opt_val_subject );
38
  $config->set( $opt_name_body, $opt_val_body );
admin/siteguard-menu-login-lock.php CHANGED
@@ -40,7 +40,7 @@ class SiteGuard_Menu_Login_Lock extends SiteGuard_Base {
40
  || ( false == $this->is_interval_value( $_POST[ $opt_name_interval ] ) )
41
  || ( false == $this->is_threshold_value( $_POST[ $opt_name_threshold ] ) )
42
  || ( false == $this->is_locksec_value( $_POST[ $opt_name_locksec ] ) ) ) {
43
- echo '<div class="error settings-error"><p><strong>';
44
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
45
  echo '</strong></p></div>';
46
  $error = true;
@@ -124,7 +124,7 @@ class SiteGuard_Menu_Login_Lock extends SiteGuard_Base {
124
  <hr />
125
  <input type="hidden" name="update" value="Y">
126
 
127
- <?php
128
  wp_nonce_field( 'siteguard-menu-login-lock-submit' );
129
  submit_button( );
130
  ?>
40
  || ( false == $this->is_interval_value( $_POST[ $opt_name_interval ] ) )
41
  || ( false == $this->is_threshold_value( $_POST[ $opt_name_threshold ] ) )
42
  || ( false == $this->is_locksec_value( $_POST[ $opt_name_locksec ] ) ) ) {
43
+ echo '<div class="error settings-error"><p><strong>';
44
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
45
  echo '</strong></p></div>';
46
  $error = true;
124
  <hr />
125
  <input type="hidden" name="update" value="Y">
126
 
127
+ <?php
128
  wp_nonce_field( 'siteguard-menu-login-lock-submit' );
129
  submit_button( );
130
  ?>
admin/siteguard-menu-rename-login.php CHANGED
@@ -14,25 +14,25 @@ class SiteGuard_Menu_Rename_Login extends SiteGuard_Base {
14
  $opt_val_rename_login_path = $config->get( $opt_name_rename_login_path );
15
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-rename-login-submit' ) ) {
16
  $error = false;
17
- if ( '1' == $_POST[ $opt_name_feature ] && $this->check_module( 'rewrite' ) == false ) {
18
  echo '<div class="error settings-error"><p><strong>';
19
  esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
20
  echo '</strong></p></div>';
21
- $error = true;
22
  $config->set( $opt_name_feature, '0' );
23
  $config->update( );
24
  $rename_login->feature_off( );
25
  $opt_val_feature = '0';
26
  }
27
  if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
28
- echo '<div class="error settings-error"><p><strong>';
29
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
30
  echo '</strong></p></div>';
31
  $error = true;
32
  }
33
  if ( '1' == $_POST[ $opt_name_feature ] ) {
34
  $incompatible_plugin = $rename_login->get_active_incompatible_plugin( );
35
- if ( NULL != $incompatible_plugin ) {
36
  echo '<div class="error settings-error"><p><strong>';
37
  echo esc_html__( 'This function and Plugin "', 'siteguard' ) . $incompatible_plugin . esc_html__( '" cannot be used at the same time.', 'siteguard' );
38
  echo '</strong></p></div>';
@@ -95,7 +95,7 @@ class SiteGuard_Menu_Rename_Login extends SiteGuard_Base {
95
  </li>
96
  </ul>
97
  <?php
98
- echo '<p class="description">';
99
  esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
100
  echo '</p>';
101
  ?>
@@ -105,7 +105,7 @@ class SiteGuard_Menu_Rename_Login extends SiteGuard_Base {
105
  <td>
106
  <?php echo site_url() . '/' ?><input type="text" name="<?php echo $opt_name_rename_login_path ?>" id="<?php echo $opt_name_rename_login_path ?>" value="<?php echo esc_attr( $opt_val_rename_login_path ) ?>" >
107
  <?php
108
- echo '<p class="description">';
109
  esc_html_e( 'An alphanumeric character, a hyphen, and an underbar can be used.', 'siteguard' );
110
  echo '</p>';
111
  ?>
14
  $opt_val_rename_login_path = $config->get( $opt_name_rename_login_path );
15
  if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-rename-login-submit' ) ) {
16
  $error = false;
17
+ if ( '1' == $_POST[ $opt_name_feature ] && false == $this->check_module( 'rewrite' ) ) {
18
  echo '<div class="error settings-error"><p><strong>';
19
  esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
20
  echo '</strong></p></div>';
21
+ $error = true;
22
  $config->set( $opt_name_feature, '0' );
23
  $config->update( );
24
  $rename_login->feature_off( );
25
  $opt_val_feature = '0';
26
  }
27
  if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
28
+ echo '<div class="error settings-error"><p><strong>';
29
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
30
  echo '</strong></p></div>';
31
  $error = true;
32
  }
33
  if ( '1' == $_POST[ $opt_name_feature ] ) {
34
  $incompatible_plugin = $rename_login->get_active_incompatible_plugin( );
35
+ if ( null != $incompatible_plugin ) {
36
  echo '<div class="error settings-error"><p><strong>';
37
  echo esc_html__( 'This function and Plugin "', 'siteguard' ) . $incompatible_plugin . esc_html__( '" cannot be used at the same time.', 'siteguard' );
38
  echo '</strong></p></div>';
95
  </li>
96
  </ul>
97
  <?php
98
+ echo '<p class="description">';
99
  esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
100
  echo '</p>';
101
  ?>
105
  <td>
106
  <?php echo site_url() . '/' ?><input type="text" name="<?php echo $opt_name_rename_login_path ?>" id="<?php echo $opt_name_rename_login_path ?>" value="<?php echo esc_attr( $opt_val_rename_login_path ) ?>" >
107
  <?php
108
+ echo '<p class="description">';
109
  esc_html_e( 'An alphanumeric character, a hyphen, and an underbar can be used.', 'siteguard' );
110
  echo '</p>';
111
  ?>
admin/siteguard-menu-same-error.php CHANGED
@@ -22,7 +22,7 @@ class SiteGuard_Menu_Same_Error extends SiteGuard_Base {
22
  }
23
  }
24
  if ( false == $this->is_switch_value( $_POST[ $opt_name_enable ] ) ) {
25
- echo '<div class="error settings-error"><p><strong>';
26
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
27
  echo '</strong></p></div>';
28
  $error = true;
@@ -64,7 +64,7 @@ class SiteGuard_Menu_Same_Error extends SiteGuard_Base {
64
  </div>
65
  <hr />
66
 
67
- <?php
68
  wp_nonce_field( 'siteguard-menu-same-error-submit' );
69
  submit_button();
70
  ?>
22
  }
23
  }
24
  if ( false == $this->is_switch_value( $_POST[ $opt_name_enable ] ) ) {
25
+ echo '<div class="error settings-error"><p><strong>';
26
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
27
  echo '</strong></p></div>';
28
  $error = true;
64
  </div>
65
  <hr />
66
 
67
+ <?php
68
  wp_nonce_field( 'siteguard-menu-same-error-submit' );
69
  submit_button();
70
  ?>
admin/siteguard-menu-waf-tuning-support.php CHANGED
@@ -13,7 +13,7 @@ class SiteGuard_Menu_WAF_Tuning_Support extends SiteGuard_Base {
13
  function set_filename( $filename ) {
14
  $base = basename( $filename );
15
  $idx = strpos( $base, '?' );
16
- if ( $idx !== false ) {
17
  return substr( $base, 0, $idx );
18
  } else {
19
  return $base;
@@ -128,18 +128,18 @@ class SiteGuard_Menu_WAF_Tuning_Support extends SiteGuard_Base {
128
  if ( ! isset( $_POST['waf_exclude_rule_enable'] ) ) {
129
  // error
130
  } else {
131
- $error = false;
132
- if ( '1' == $_POST['waf_exclude_rule_enable'] && $this->check_module( 'siteguard' ) == false ) {
133
- echo '<div class="error settings-error"><p><strong>';
134
- esc_html_e( 'To use the WAF exclude rule, WAF ( SiteGuard Lite ) should be installed on Apache.', 'siteguard' );
135
- echo '</strong></p></div>';
136
- $error = true;
137
  $waf_exclude_rule->set_enable( '0' );
138
  $waf_exclude_rule->feature_off( );
139
  $waf_exclude_rule_enable = '0';
140
- }
141
  if ( false == $this->is_switch_value( $_POST['waf_exclude_rule_enable'] ) ) {
142
- echo '<div class="error settings-error"><p><strong>';
143
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
144
  echo '</strong></p></div>';
145
  $error = true;
@@ -262,7 +262,7 @@ By creating the WAF exclude rule, the WAF protection function can be activated w
262
  if ( 'add' == $action ) {
263
  echo '<input type="hidden" name="update" id="update" value="add">';
264
  wp_nonce_field( 'siteguard-menu-waf-tuning-support-add' );
265
- submit_button( esc_attr__( 'Save', 'siteguard') );
266
  } else {
267
  echo '<input type="hidden" name="update" id="update" value="edit">';
268
  echo '<input type="hidden" name="rule" id="rule" value="' . esc_attr( $id ) . '">';
@@ -276,7 +276,7 @@ By creating the WAF exclude rule, the WAF protection function can be activated w
276
  ?>
277
  <form name="form1" method="post" action="<?php echo esc_url( menu_page_url( 'siteguard_waf_tuning_support', false ) ) ?>">
278
  <?php
279
- echo '<p>' . _n( 'You have specified this rule for deletion:', 'You have specified these rules for deletion:', count( $ids ), 'siteguard' ) . '</p>';
280
  $go_delete = 0;
281
  foreach ( $ids as $id ) {
282
  $offset = 0;
@@ -284,7 +284,7 @@ By creating the WAF exclude rule, the WAF protection function can be activated w
284
  echo '<input type="hidden" name="rule[]" value="' . esc_attr( $id ) . '" />' . esc_html__( 'Signature', 'siteguard' ) . ' : ' . esc_html__( 'Filename', 'siteguard' ) . ' : ' . esc_html__( 'Comment', 'siteguard' ) . ' [' . esc_html( $rule['sig'] ) . ' : ' . esc_html( $rule['filename'] ) . ' : ' . esc_html( $rule['comment'] ) . "]<br />\n";
285
  $go_delete = 1;
286
  }
287
- if ( $go_delete == 1 ) {
288
  echo '<input type="hidden" name="update" id="update" value="delete">';
289
  wp_nonce_field( 'siteguard-menu-waf-tuning-support-delete' );
290
  submit_button( esc_attr__( 'Confirm Deletion', 'siteguard' ) );
13
  function set_filename( $filename ) {
14
  $base = basename( $filename );
15
  $idx = strpos( $base, '?' );
16
+ if ( false !== $idx ) {
17
  return substr( $base, 0, $idx );
18
  } else {
19
  return $base;
128
  if ( ! isset( $_POST['waf_exclude_rule_enable'] ) ) {
129
  // error
130
  } else {
131
+ $error = false;
132
+ if ( '1' == $_POST['waf_exclude_rule_enable'] && false == $this->check_module( 'siteguard' ) ) {
133
+ echo '<div class="error settings-error"><p><strong>';
134
+ esc_html_e( 'To use the WAF exclude rule, WAF ( SiteGuard Lite ) should be installed on Apache.', 'siteguard' );
135
+ echo '</strong></p></div>';
136
+ $error = true;
137
  $waf_exclude_rule->set_enable( '0' );
138
  $waf_exclude_rule->feature_off( );
139
  $waf_exclude_rule_enable = '0';
140
+ }
141
  if ( false == $this->is_switch_value( $_POST['waf_exclude_rule_enable'] ) ) {
142
+ echo '<div class="error settings-error"><p><strong>';
143
  esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
144
  echo '</strong></p></div>';
145
  $error = true;
262
  if ( 'add' == $action ) {
263
  echo '<input type="hidden" name="update" id="update" value="add">';
264
  wp_nonce_field( 'siteguard-menu-waf-tuning-support-add' );
265
+ submit_button( esc_attr__( 'Save', 'siteguard' ) );
266
  } else {
267
  echo '<input type="hidden" name="update" id="update" value="edit">';
268
  echo '<input type="hidden" name="rule" id="rule" value="' . esc_attr( $id ) . '">';
276
  ?>
277
  <form name="form1" method="post" action="<?php echo esc_url( menu_page_url( 'siteguard_waf_tuning_support', false ) ) ?>">
278
  <?php
279
+ echo '<p>' .esc_html( _n( 'You have specified this rule for deletion:', 'You have specified these rules for deletion:', count( $ids ), 'siteguard' ) ) . '</p>';
280
  $go_delete = 0;
281
  foreach ( $ids as $id ) {
282
  $offset = 0;
284
  echo '<input type="hidden" name="rule[]" value="' . esc_attr( $id ) . '" />' . esc_html__( 'Signature', 'siteguard' ) . ' : ' . esc_html__( 'Filename', 'siteguard' ) . ' : ' . esc_html__( 'Comment', 'siteguard' ) . ' [' . esc_html( $rule['sig'] ) . ' : ' . esc_html( $rule['filename'] ) . ' : ' . esc_html( $rule['comment'] ) . "]<br />\n";
285
  $go_delete = 1;
286
  }
287
+ if ( 1 == $go_delete ) {
288
  echo '<input type="hidden" name="update" id="update" value="delete">';
289
  wp_nonce_field( 'siteguard-menu-waf-tuning-support-delete' );
290
  submit_button( esc_attr__( 'Confirm Deletion', 'siteguard' ) );
classes/siteguard-admin-filter.php CHANGED
@@ -24,14 +24,8 @@ class SiteGuard_AdminFilter extends SiteGuard_Base {
24
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
25
  dbDelta( $sql );
26
  $config->set( 'admin_filter_exclude_path', 'css,images,admin-ajax.php' );
27
- if ( $this->check_module( 'rewrite' ) ) {
28
- $config->set( 'admin_filter_enable', '1' );
29
- $config->update( );
30
- $this->feature_on( $_SERVER['REMOTE_ADDR'] );
31
- } else {
32
- $config->set( 'admin_filter_enable', '0' );
33
- $config->update( );
34
- }
35
  }
36
  function handler_wp_login( $login, $current_user ) {
37
  global $htaccess, $config;
@@ -83,7 +77,7 @@ class SiteGuard_AdminFilter extends SiteGuard_Base {
83
  $htaccess_str .= " RewriteEngine on\n";
84
  $htaccess_str .= " RewriteBase $base\n";
85
  $htaccess_str .= " RewriteRule ^404-siteguard - [L]\n";
86
- foreach( $exclude_paths as $path ) {
87
  $htaccess_str .= ' RewriteRule ^wp-admin/' . trim( $path ) . " - [L]\n";
88
  }
89
  $htaccess_str .= ' RewriteCond %{REMOTE_ADDR} !(127.0.0.1|'. $_SERVER['SERVER_ADDR'] . ")\n";
24
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
25
  dbDelta( $sql );
26
  $config->set( 'admin_filter_exclude_path', 'css,images,admin-ajax.php' );
27
+ $config->set( 'admin_filter_enable', '0' );
28
+ $config->update( );
 
 
 
 
 
 
29
  }
30
  function handler_wp_login( $login, $current_user ) {
31
  global $htaccess, $config;
77
  $htaccess_str .= " RewriteEngine on\n";
78
  $htaccess_str .= " RewriteBase $base\n";
79
  $htaccess_str .= " RewriteRule ^404-siteguard - [L]\n";
80
+ foreach ( $exclude_paths as $path ) {
81
  $htaccess_str .= ' RewriteRule ^wp-admin/' . trim( $path ) . " - [L]\n";
82
  }
83
  $htaccess_str .= ' RewriteCond %{REMOTE_ADDR} !(127.0.0.1|'. $_SERVER['SERVER_ADDR'] . ")\n";
classes/siteguard-base.php CHANGED
@@ -33,7 +33,7 @@ class SiteGuard_Base {
33
  return $default;
34
  }
35
 
36
- # It does not work in FastCGI well.
37
  #$module = 'mod_' . $name;
38
  #return apache_mod_loaded( $module, $default );
39
  #if ( function_exists('phpinfo') ) {
@@ -47,12 +47,12 @@ class SiteGuard_Base {
47
  #return $default;
48
  }
49
  function is_active_plugin( $plugin ) {
50
- if ( function_exists('is_plugin_active') ) {
51
  return is_plugin_active( $plugin );
52
  } else {
53
  return in_array(
54
  $plugin,
55
- get_option('active_plugins')
56
  );
57
  }
58
  }
33
  return $default;
34
  }
35
 
36
+ # It does not work in FastCGI well.
37
  #$module = 'mod_' . $name;
38
  #return apache_mod_loaded( $module, $default );
39
  #if ( function_exists('phpinfo') ) {
47
  #return $default;
48
  }
49
  function is_active_plugin( $plugin ) {
50
+ if ( function_exists( 'is_plugin_active' ) ) {
51
  return is_plugin_active( $plugin );
52
  } else {
53
  return in_array(
54
  $plugin,
55
+ get_option( 'active_plugins' )
56
  );
57
  }
58
  }
classes/siteguard-captcha.php CHANGED
@@ -93,16 +93,16 @@ class SiteGuard_CAPTCHA extends SiteGuard_Base {
93
  $switch = '0';
94
  }
95
  $config->set( 'captcha_enable', $switch );
96
- $language = get_bloginfo('language');
97
- if ( 'ja' == $language ) {
98
- $mode = '1'; // hiragana
99
- } else {
100
- $mode = '2'; // alphanumeric
101
- }
102
- $config->set( 'captcha_login', $mode );
103
- $config->set( 'captcha_comment', $mode );
104
- $config->set( 'captcha_lostpasswd', $mode );
105
- $config->set( 'captcha_registuser', $mode );
106
  $config->set( 'same_login_error', '1' );
107
  $config->update( );
108
  }
93
  $switch = '0';
94
  }
95
  $config->set( 'captcha_enable', $switch );
96
+ $language = get_bloginfo( 'language' );
97
+ if ( 'ja' == $language ) {
98
+ $mode = '1'; // hiragana
99
+ } else {
100
+ $mode = '2'; // alphanumeric
101
+ }
102
+ $config->set( 'captcha_login', $mode );
103
+ $config->set( 'captcha_comment', $mode );
104
+ $config->set( 'captcha_lostpasswd', $mode );
105
+ $config->set( 'captcha_registuser', $mode );
106
  $config->set( 'same_login_error', '1' );
107
  $config->update( );
108
  }
classes/siteguard-htaccess.php CHANGED
@@ -168,16 +168,14 @@ class SiteGuard_Htaccess extends SiteGuard_Base {
168
  fwrite( $fw, $mark_end . "\n", strlen( $mark_end ) + 1 );
169
  fwrite( $fw, SiteGuard_Htaccess::$htaccess_mark_end . "\n", strlen( SiteGuard_Htaccess::$htaccess_mark_end ) + 1 );
170
  }
171
- // Write saved WordPress Settings
172
- if ( '' != $wp_settings ) {
173
  fwrite( $fw, "\n", 1 );
174
  fwrite( $fw, $wp_settings, strlen( $wp_settings ) );
175
  fwrite( $fw, "\n", 1 );
176
- // Write empty WordPress Settings
177
- } else if ( false == $flag_wp ) {
178
  fwrite( $fw, "\n", 1 );
179
  fwrite( $fw, $mark_wp_start . "\n", strlen( $mark_wp_start ) + 1 );
180
- fwrite( $fw, $mark_wp_end . "\n", strlen( $mark_wp_end ) + 1 );
181
  fwrite( $fw, "\n", 1 );
182
  }
183
  fclose( $fr );
168
  fwrite( $fw, $mark_end . "\n", strlen( $mark_end ) + 1 );
169
  fwrite( $fw, SiteGuard_Htaccess::$htaccess_mark_end . "\n", strlen( SiteGuard_Htaccess::$htaccess_mark_end ) + 1 );
170
  }
171
+ if ( '' != $wp_settings ) { // Write saved WordPress Settings
 
172
  fwrite( $fw, "\n", 1 );
173
  fwrite( $fw, $wp_settings, strlen( $wp_settings ) );
174
  fwrite( $fw, "\n", 1 );
175
+ } else if ( false == $flag_wp ) { // Write empty WordPress Settings
 
176
  fwrite( $fw, "\n", 1 );
177
  fwrite( $fw, $mark_wp_start . "\n", strlen( $mark_wp_start ) + 1 );
178
+ fwrite( $fw, $mark_wp_end . "\n", strlen( $mark_wp_end ) + 1 );
179
  fwrite( $fw, "\n", 1 );
180
  }
181
  fclose( $fr );
classes/siteguard-login-alert.php CHANGED
@@ -18,33 +18,33 @@ class SiteGuard_LoginAlert extends SiteGuard_Base {
18
  function replace_valuable( $string, $username ) {
19
  $search = array( '%SITENAME%', '%USERNAME%', '%DATE%', '%TIME%', '%IPADDRESS%', '%USERAGENT%', '%REFERER%' );
20
  $replace = array(
21
- get_option('blogname'),
22
  $username,
23
- date( 'Y-m-d', current_time('timestamp') ),
24
- date( 'H:i:s', current_time('timestamp') ),
25
  isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : '-',
26
  isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '-',
27
  isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '-'
28
  );
29
- return str_replace( $search, $replace, $string);
30
  }
31
  function handler_wp_login( $username, $user ) {
32
  global $config;
33
 
34
- if ( ( '1' == $config->get('loginalert_admin_only') ) && ( ! $user->has_cap('administrator') ) ) {
35
  return;
36
  }
37
 
38
- $user_email = $user->get('user_email');
39
 
40
- $subject = $config->get('loginalert_subject');
41
- $body = $config->get('loginalert_body');
42
 
43
  $subject = $this->replace_valuable( $subject, $username );
44
  $body = $this->replace_valuable( $body, $username );
45
 
46
- @wp_mail( $user_email, esc_html( $subject), esc_html( $body ) );
47
-
48
  return;
49
  }
50
  }
18
  function replace_valuable( $string, $username ) {
19
  $search = array( '%SITENAME%', '%USERNAME%', '%DATE%', '%TIME%', '%IPADDRESS%', '%USERAGENT%', '%REFERER%' );
20
  $replace = array(
21
+ get_option( 'blogname' ),
22
  $username,
23
+ date( 'Y-m-d', current_time( 'timestamp' ) ),
24
+ date( 'H:i:s', current_time( 'timestamp' ) ),
25
  isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : '-',
26
  isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '-',
27
  isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '-'
28
  );
29
+ return str_replace( $search, $replace, $string );
30
  }
31
  function handler_wp_login( $username, $user ) {
32
  global $config;
33
 
34
+ if ( ( '1' == $config->get( 'loginalert_admin_only' ) ) && ( ! $user->has_cap( 'administrator' ) ) ) {
35
  return;
36
  }
37
 
38
+ $user_email = $user->get( 'user_email' );
39
 
40
+ $subject = $config->get( 'loginalert_subject' );
41
+ $body = $config->get( 'loginalert_body' );
42
 
43
  $subject = $this->replace_valuable( $subject, $username );
44
  $body = $this->replace_valuable( $body, $username );
45
 
46
+ @wp_mail( $user_email, esc_html( $subject ), esc_html( $body ) );
47
+
48
  return;
49
  }
50
  }
classes/siteguard-login-lock.php CHANGED
@@ -103,7 +103,7 @@ class SiteGuard_LoginLock extends SiteGuard_Base {
103
  if ( is_wp_error( $user ) ) {
104
  return $user;
105
  }
106
- if ( !wp_check_password($password, $user->user_pass, $user->ID) ) {
107
  return $user;
108
  }
109
  if ( '1' == $config->get( 'fail_once_admin_only' ) ) {
103
  if ( is_wp_error( $user ) ) {
104
  return $user;
105
  }
106
+ if ( ! wp_check_password( $password, $user->user_pass, $user->ID ) ) {
107
  return $user;
108
  }
109
  if ( '1' == $config->get( 'fail_once_admin_only' ) ) {
classes/siteguard-rename-login.php CHANGED
@@ -6,13 +6,12 @@ class SiteGuard_RenameLogin extends SiteGuard_Base {
6
  function __construct( ) {
7
  global $config;
8
  if ( '1' == $config->get( 'renamelogin_enable' ) ) {
9
- if ( NULL != $this->get_active_incompatible_plugin( ) ) {
10
  $config->set( 'renamelogin_enable', '0' );
11
  $config->update( );
12
  $this->feature_off( );
13
  return;
14
  }
15
-
16
  $this->add_filter( );
17
  }
18
  }
@@ -22,7 +21,7 @@ class SiteGuard_RenameLogin extends SiteGuard_Base {
22
  function init( ) {
23
  global $config;
24
  $config->set( 'renamelogin_path', 'login_' . sprintf( '%05d', mt_rand( 1, 99999 ) ) );
25
- if ( $this->check_module( 'rewrite' ) && NULL == $this->get_active_incompatible_plugin( ) ) {
26
  $config->set( 'renamelogin_enable', '1' );
27
  $config->update( );
28
  $this->feature_on( );
@@ -32,7 +31,7 @@ class SiteGuard_RenameLogin extends SiteGuard_Base {
32
  }
33
  }
34
  function get_active_incompatible_plugin( ) {
35
- $incompatible_plugins = array(
36
  'WordPress HTTPS (SSL)' => 'wordpress-https/wordpress-https.php',
37
  );
38
  foreach ( $incompatible_plugins as $name => $path ) {
@@ -40,7 +39,7 @@ class SiteGuard_RenameLogin extends SiteGuard_Base {
40
  return $name;
41
  }
42
  }
43
- return NULL;
44
  }
45
  function add_filter( ) {
46
  add_filter( 'login_init', array( $this, 'handler_login_init' ), 10, 2 );
@@ -147,7 +146,7 @@ class SiteGuard_RenameLogin extends SiteGuard_Base {
147
  $user_query = new WP_User_Query( array( 'role' => 'Administrator' ) );
148
  if ( ! empty( $user_query->results ) ) {
149
  foreach ( $user_query->results as $user ) {
150
- @wp_mail( $user->get('user_email'), $subject, $body );
151
  }
152
  }
153
  }
6
  function __construct( ) {
7
  global $config;
8
  if ( '1' == $config->get( 'renamelogin_enable' ) ) {
9
+ if ( null != $this->get_active_incompatible_plugin( ) ) {
10
  $config->set( 'renamelogin_enable', '0' );
11
  $config->update( );
12
  $this->feature_off( );
13
  return;
14
  }
 
15
  $this->add_filter( );
16
  }
17
  }
21
  function init( ) {
22
  global $config;
23
  $config->set( 'renamelogin_path', 'login_' . sprintf( '%05d', mt_rand( 1, 99999 ) ) );
24
+ if ( $this->check_module( 'rewrite' ) && null == $this->get_active_incompatible_plugin( ) ) {
25
  $config->set( 'renamelogin_enable', '1' );
26
  $config->update( );
27
  $this->feature_on( );
31
  }
32
  }
33
  function get_active_incompatible_plugin( ) {
34
+ $incompatible_plugins = array(
35
  'WordPress HTTPS (SSL)' => 'wordpress-https/wordpress-https.php',
36
  );
37
  foreach ( $incompatible_plugins as $name => $path ) {
39
  return $name;
40
  }
41
  }
42
+ return null;
43
  }
44
  function add_filter( ) {
45
  add_filter( 'login_init', array( $this, 'handler_login_init' ), 10, 2 );
146
  $user_query = new WP_User_Query( array( 'role' => 'Administrator' ) );
147
  if ( ! empty( $user_query->results ) ) {
148
  foreach ( $user_query->results as $user ) {
149
+ @wp_mail( $user->get( 'user_email' ), $subject, $body );
150
  }
151
  }
152
  }
classes/siteguard-waf-exclude-rule.php CHANGED
@@ -51,12 +51,12 @@ class SiteGuard_WAF_Exclude_Rule extends SiteGuard_Base {
51
  $errors->add( 'white_list_error', esc_html__( 'ERROR: Signature is required', 'siteguard' ) );
52
  } else {
53
  $tmp_sig = str_ireplace( 'SiteGuard_User_ExcludeSig ', '', $sig );
54
- $tmp_sig = str_replace( ' ', '', $tmp_sig );
55
  $tmp_sig = preg_replace( "/\r\n(\r\n)+/", "\r\n", $tmp_sig );
56
  $tmp_sig = preg_replace( "/\r\n$/", '', $tmp_sig );
57
  $tmp_sig = preg_replace( "/\n\n+/", "\n", $tmp_sig );
58
  $tmp_sig = preg_replace( "/\n$/", '', $tmp_sig );
59
- if ( preg_match( '/^[a-zA-Z0-9-\r\n]+$/', $tmp_sig ) != 1 ) {
60
  $errors->add( 'white_list_error', esc_html__( 'ERROR: Syntax Error in Signature', 'siteguard' ) );
61
  } else {
62
  $sig = $tmp_sig;
@@ -77,7 +77,7 @@ class SiteGuard_WAF_Exclude_Rule extends SiteGuard_Base {
77
  return $errors;
78
  }
79
  $sig = str_ireplace( 'SiteGuard_User_ExcludeSig', '', $sig );
80
- $sig = str_replace( ' ', '', $sig );
81
  $rules = $config->get( SITEGUARD_WAF_EXCLUDE_RULE );
82
  $rule = array(
83
  'ID' => $this->get_max_id( $rules ) + 1,
@@ -176,7 +176,7 @@ class SiteGuard_WAF_Exclude_Rule extends SiteGuard_Base {
176
  return $result;
177
  }
178
  // for SiteGuard Lite Ver1.x
179
- function output_ExcludeSig_1( $sig_str ) {
180
  $result = '';
181
  $csv = $this->cvt_csrf2comma( $sig_str );
182
  $sigs = preg_split( '/,/', $csv );
@@ -189,7 +189,7 @@ class SiteGuard_WAF_Exclude_Rule extends SiteGuard_Base {
189
  return $result;
190
  }
191
  // for SiteGuard Lite Ver2.x
192
- function output_ExcludeSig_2( $sig_str ) {
193
  return ' SiteGuard_User_ExcludeSig '. $this->cvt_csrf2comma( $sig_str ) . "\n";
194
  }
195
  function update_settings( ) {
@@ -207,10 +207,10 @@ class SiteGuard_WAF_Exclude_Rule extends SiteGuard_Base {
207
  $sig = $rule['sig'];
208
  if ( ! empty( $filename ) ) {
209
  $htaccess_str .= " <Files $filename >\n";
210
- $htaccess_str .= $this->output_ExcludeSig_1( $sig );
211
  $htaccess_str .= " </Files>\n";
212
  } else {
213
- $htaccess_str .= $this->output_ExcludeSig_1( $sig );
214
  }
215
  }
216
  }
51
  $errors->add( 'white_list_error', esc_html__( 'ERROR: Signature is required', 'siteguard' ) );
52
  } else {
53
  $tmp_sig = str_ireplace( 'SiteGuard_User_ExcludeSig ', '', $sig );
54
+ $tmp_sig = str_replace( ' ', '', $tmp_sig );
55
  $tmp_sig = preg_replace( "/\r\n(\r\n)+/", "\r\n", $tmp_sig );
56
  $tmp_sig = preg_replace( "/\r\n$/", '', $tmp_sig );
57
  $tmp_sig = preg_replace( "/\n\n+/", "\n", $tmp_sig );
58
  $tmp_sig = preg_replace( "/\n$/", '', $tmp_sig );
59
+ if ( 1 != preg_match( '/^[a-zA-Z0-9-\r\n]+$/', $tmp_sig ) ) {
60
  $errors->add( 'white_list_error', esc_html__( 'ERROR: Syntax Error in Signature', 'siteguard' ) );
61
  } else {
62
  $sig = $tmp_sig;
77
  return $errors;
78
  }
79
  $sig = str_ireplace( 'SiteGuard_User_ExcludeSig', '', $sig );
80
+ $sig = str_replace( ' ', '', $sig );
81
  $rules = $config->get( SITEGUARD_WAF_EXCLUDE_RULE );
82
  $rule = array(
83
  'ID' => $this->get_max_id( $rules ) + 1,
176
  return $result;
177
  }
178
  // for SiteGuard Lite Ver1.x
179
+ function output_exclude_sig_1( $sig_str ) {
180
  $result = '';
181
  $csv = $this->cvt_csrf2comma( $sig_str );
182
  $sigs = preg_split( '/,/', $csv );
189
  return $result;
190
  }
191
  // for SiteGuard Lite Ver2.x
192
+ function output_exclude_sig_2( $sig_str ) {
193
  return ' SiteGuard_User_ExcludeSig '. $this->cvt_csrf2comma( $sig_str ) . "\n";
194
  }
195
  function update_settings( ) {
207
  $sig = $rule['sig'];
208
  if ( ! empty( $filename ) ) {
209
  $htaccess_str .= " <Files $filename >\n";
210
+ $htaccess_str .= $this->output_exclude_sig_1( $sig );
211
  $htaccess_str .= " </Files>\n";
212
  } else {
213
+ $htaccess_str .= $this->output_exclude_sig_1( $sig );
214
  }
215
  }
216
  }
languages/siteguard-ja.mo CHANGED
Binary file
languages/siteguard-ja.po CHANGED
@@ -523,9 +523,9 @@ msgstr "削除"
523
 
524
  #: classes/siteguard-captcha.php:60
525
  msgid ""
526
- "In order to use this function, it is necessary to install expanded modules"
527
  msgstr ""
528
- "この機能を使用するには、次の拡張モジュールがサーバーにインストールされている必要gがあります。"
529
 
530
  #: classes/siteguard-captcha.php:71
531
  msgid "in the server."
523
 
524
  #: classes/siteguard-captcha.php:60
525
  msgid ""
526
+ "In order to enable this function, it is necessary to install expanded modules"
527
  msgstr ""
528
+ "この機能を使用するには、次の拡張モジュールがサーバーにインストールされている必要があります。"
529
 
530
  #: classes/siteguard-captcha.php:71
531
  msgid "in the server."
languages/siteguard.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the SiteGuard WP Plugin package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: SiteGuard WP Plugin 1.1.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/siteguard\n"
7
- "POT-Creation-Date: 2014-11-14 02:54:50+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -39,7 +39,7 @@ msgstr ""
39
  #: admin/siteguard-menu-captcha.php:44
40
  #: admin/siteguard-menu-disable-pingback.php:16
41
  #: admin/siteguard-menu-fail-once.php:19
42
- #: admin/siteguard-menu-login-alert.php:33
43
  #: admin/siteguard-menu-login-lock.php:44
44
  #: admin/siteguard-menu-rename-login.php:29
45
  #: admin/siteguard-menu-same-error.php:26
@@ -54,7 +54,7 @@ msgstr ""
54
  #: admin/siteguard-menu-captcha.php:61
55
  #: admin/siteguard-menu-disable-pingback.php:25
56
  #: admin/siteguard-menu-fail-once.php:34
57
- #: admin/siteguard-menu-login-alert.php:52
58
  #: admin/siteguard-menu-login-lock.php:59
59
  #: admin/siteguard-menu-rename-login.php:74
60
  #: admin/siteguard-menu-same-error.php:35
@@ -70,7 +70,7 @@ msgstr ""
70
  #: admin/siteguard-menu-captcha.php:73
71
  #: admin/siteguard-menu-disable-pingback.php:38
72
  #: admin/siteguard-menu-fail-once.php:46
73
- #: admin/siteguard-menu-login-alert.php:64
74
  #: admin/siteguard-menu-login-lock.php:71
75
  #: admin/siteguard-menu-rename-login.php:86
76
  #: admin/siteguard-menu-same-error.php:47
@@ -82,7 +82,7 @@ msgstr ""
82
  #: admin/siteguard-menu-captcha.php:78
83
  #: admin/siteguard-menu-disable-pingback.php:43
84
  #: admin/siteguard-menu-fail-once.php:51
85
- #: admin/siteguard-menu-login-alert.php:69
86
  #: admin/siteguard-menu-login-lock.php:76
87
  #: admin/siteguard-menu-rename-login.php:91
88
  #: admin/siteguard-menu-same-error.php:52
@@ -94,7 +94,7 @@ msgstr ""
94
  #: admin/siteguard-menu-captcha.php:81
95
  #: admin/siteguard-menu-disable-pingback.php:46
96
  #: admin/siteguard-menu-fail-once.php:54
97
- #: admin/siteguard-menu-login-alert.php:72
98
  #: admin/siteguard-menu-login-lock.php:79
99
  #: admin/siteguard-menu-rename-login.php:94
100
  #: admin/siteguard-menu-same-error.php:55
@@ -177,7 +177,7 @@ msgid ""
177
  "Plugin on "
178
  msgstr ""
179
 
180
- #. #-#-#-#-# siteguard.pot (SiteGuard WP Plugin 1.1.0) #-#-#-#-#
181
  #. Plugin URI of the plugin/theme
182
  #: admin/siteguard-menu-dashboard.php:29
183
  msgid ""
@@ -238,7 +238,7 @@ msgid ""
238
  msgstr ""
239
 
240
  #: admin/siteguard-menu-dashboard.php:61 admin/siteguard-menu-init.php:21
241
- #: admin/siteguard-menu-login-alert.php:59
242
  msgid "Login Alert"
243
  msgstr ""
244
 
@@ -287,7 +287,7 @@ msgid "Target user"
287
  msgstr ""
288
 
289
  #: admin/siteguard-menu-fail-once.php:63
290
- #: admin/siteguard-menu-login-alert.php:90
291
  msgid "Admin only"
292
  msgstr ""
293
 
@@ -304,25 +304,26 @@ msgstr ""
304
  msgid "SiteGuard"
305
  msgstr ""
306
 
307
- #: admin/siteguard-menu-login-alert.php:77
308
  msgid "Subject"
309
  msgstr ""
310
 
311
- #: admin/siteguard-menu-login-alert.php:82
312
  msgid "Body"
313
  msgstr ""
314
 
315
- #: admin/siteguard-menu-login-alert.php:87
316
  msgid "Recipients"
317
  msgstr ""
318
 
319
- #: admin/siteguard-menu-login-alert.php:96
320
  msgid ""
321
  "It is the function to make it easier to notice unauthorized login. E-mail "
322
- "will be sent to each to login. If you receive an e-mail to there is no "
323
- "logged-in idea, please suspect unauthorized login. The subject and the mail "
324
- "body, the following variables can be used. (Site Name:%SITENAME%, User Name:"
325
- "%USERNAME%, DATE:%DATE%, Time:%TIME%)"
 
326
  msgstr ""
327
 
328
  #: admin/siteguard-menu-login-lock.php:84
@@ -587,6 +588,11 @@ msgstr ""
587
  msgid ""
588
  "%USERNAME% logged in at %DATE% %TIME%\n"
589
  "\n"
 
 
 
 
 
590
  "--\n"
591
  "SiteGuard WP Plugin"
592
  msgstr ""
2
  # This file is distributed under the same license as the SiteGuard WP Plugin package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: SiteGuard WP Plugin 1.1.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/siteguard\n"
7
+ "POT-Creation-Date: 2014-12-17 02:35:22+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
39
  #: admin/siteguard-menu-captcha.php:44
40
  #: admin/siteguard-menu-disable-pingback.php:16
41
  #: admin/siteguard-menu-fail-once.php:19
42
+ #: admin/siteguard-menu-login-alert.php:23
43
  #: admin/siteguard-menu-login-lock.php:44
44
  #: admin/siteguard-menu-rename-login.php:29
45
  #: admin/siteguard-menu-same-error.php:26
54
  #: admin/siteguard-menu-captcha.php:61
55
  #: admin/siteguard-menu-disable-pingback.php:25
56
  #: admin/siteguard-menu-fail-once.php:34
57
+ #: admin/siteguard-menu-login-alert.php:42
58
  #: admin/siteguard-menu-login-lock.php:59
59
  #: admin/siteguard-menu-rename-login.php:74
60
  #: admin/siteguard-menu-same-error.php:35
70
  #: admin/siteguard-menu-captcha.php:73
71
  #: admin/siteguard-menu-disable-pingback.php:38
72
  #: admin/siteguard-menu-fail-once.php:46
73
+ #: admin/siteguard-menu-login-alert.php:54
74
  #: admin/siteguard-menu-login-lock.php:71
75
  #: admin/siteguard-menu-rename-login.php:86
76
  #: admin/siteguard-menu-same-error.php:47
82
  #: admin/siteguard-menu-captcha.php:78
83
  #: admin/siteguard-menu-disable-pingback.php:43
84
  #: admin/siteguard-menu-fail-once.php:51
85
+ #: admin/siteguard-menu-login-alert.php:59
86
  #: admin/siteguard-menu-login-lock.php:76
87
  #: admin/siteguard-menu-rename-login.php:91
88
  #: admin/siteguard-menu-same-error.php:52
94
  #: admin/siteguard-menu-captcha.php:81
95
  #: admin/siteguard-menu-disable-pingback.php:46
96
  #: admin/siteguard-menu-fail-once.php:54
97
+ #: admin/siteguard-menu-login-alert.php:62
98
  #: admin/siteguard-menu-login-lock.php:79
99
  #: admin/siteguard-menu-rename-login.php:94
100
  #: admin/siteguard-menu-same-error.php:55
177
  "Plugin on "
178
  msgstr ""
179
 
180
+ #. #-#-#-#-# siteguard.pot (SiteGuard WP Plugin 1.1.1) #-#-#-#-#
181
  #. Plugin URI of the plugin/theme
182
  #: admin/siteguard-menu-dashboard.php:29
183
  msgid ""
238
  msgstr ""
239
 
240
  #: admin/siteguard-menu-dashboard.php:61 admin/siteguard-menu-init.php:21
241
+ #: admin/siteguard-menu-login-alert.php:49
242
  msgid "Login Alert"
243
  msgstr ""
244
 
287
  msgstr ""
288
 
289
  #: admin/siteguard-menu-fail-once.php:63
290
+ #: admin/siteguard-menu-login-alert.php:80
291
  msgid "Admin only"
292
  msgstr ""
293
 
304
  msgid "SiteGuard"
305
  msgstr ""
306
 
307
+ #: admin/siteguard-menu-login-alert.php:67
308
  msgid "Subject"
309
  msgstr ""
310
 
311
+ #: admin/siteguard-menu-login-alert.php:72
312
  msgid "Body"
313
  msgstr ""
314
 
315
+ #: admin/siteguard-menu-login-alert.php:77
316
  msgid "Recipients"
317
  msgstr ""
318
 
319
+ #: admin/siteguard-menu-login-alert.php:86
320
  msgid ""
321
  "It is the function to make it easier to notice unauthorized login. E-mail "
322
+ "will be sent to a login user when logged in. If you receive an e-mail to "
323
+ "there is no logged-in idea, please suspect unauthorized login. The subject "
324
+ "and the mail body, the following variables can be used. (Site Name:%SITENAME"
325
+ "%, User Name:%USERNAME%, DATE:%DATE%, Time:%TIME%, IP Address:%IPADDRESS%, "
326
+ "User-Agent:%USERAGENT%, Referer:%REFERER%)"
327
  msgstr ""
328
 
329
  #: admin/siteguard-menu-login-lock.php:84
588
  msgid ""
589
  "%USERNAME% logged in at %DATE% %TIME%\n"
590
  "\n"
591
+ "== Login information ==\n"
592
+ "IP Address: %IPADDRESS%\n"
593
+ "Referer: %REFERER%\n"
594
+ "User-Agent: %USERAGENT%\n"
595
+ "\n"
596
  "--\n"
597
  "SiteGuard WP Plugin"
598
  msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: jp-secure
3
  Donate link: -
4
  Tags: security, waf, brute force, password list, login lock, login alert, captcha, pingback, fail once
5
  Requires at least: 3.9
6
- Tested up to: 4.0
7
- Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -95,6 +95,9 @@ If you have created your own language pack, or have an update of an existing one
95
  http://www.jp-secure.com/cont/products/siteguard_wp_plugin/faq_en.html
96
 
97
  == Changelog ==
 
 
 
98
  = 1.1.1 =
99
  * Fix bug that can not save "Login Alert" settings
100
  * Add the "Login Alert" notification variables, IP Address, User-Agent and Referer
3
  Donate link: -
4
  Tags: security, waf, brute force, password list, login lock, login alert, captcha, pingback, fail once
5
  Requires at least: 3.9
6
+ Tested up to: 4.1
7
+ Stable tag: 1.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
95
  http://www.jp-secure.com/cont/products/siteguard_wp_plugin/faq_en.html
96
 
97
  == Changelog ==
98
+ = 1.1.2 =
99
+ * Supported with WP 4.1
100
+ * Disabling the Admin IP Filter function by default
101
  = 1.1.1 =
102
  * Fix bug that can not save "Login Alert" settings
103
  * Add the "Login Alert" notification variables, IP Address, User-Agent and Referer
really-simple-captcha/siteguard-really-simple-captcha.php CHANGED
@@ -85,7 +85,7 @@ class SiteGuardReallySimpleCaptcha extends SiteGuard_Base {
85
 
86
  $word = '';
87
 
88
- if( $this->lang_mode == 'jp' ) {
89
  $this->chars = $chars_jp;
90
  } else {
91
  $this->chars = $chars_en;
@@ -114,7 +114,7 @@ class SiteGuardReallySimpleCaptcha extends SiteGuard_Base {
114
  $this->cleanup();
115
 
116
  /* Array of fonts. Randomly picked up per character */
117
- if( $this->lang_mode == 'jp' ) {
118
  $this->fonts = array(
119
  dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-black.ttf',
120
  //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-bold.ttf',
@@ -179,11 +179,9 @@ class SiteGuardReallySimpleCaptcha extends SiteGuard_Base {
179
  imagefill( $im, 0, 0, $bg );
180
 
181
  // randam lines
182
- for( $i = 0; $i < 5; $i++ ) {
183
  $color = imagecolorallocate( $im, 196, 196, 196 );
184
- imageline( $im, mt_rand( 0, $this->img_size[0] - 1 ), mt_rand( 0, $this->img_size[1] - 1 ),
185
- mt_rand( 0, $this->img_size[0] - 1 ), mt_rand( 0, $this->img_size[1] - 1 ),
186
- $color );
187
  }
188
 
189
  $x = $this->base[0] + mt_rand( -2, 2 );
@@ -197,8 +195,7 @@ class SiteGuardReallySimpleCaptcha extends SiteGuard_Base {
197
  } else {
198
  $char = mb_substr( $word, $i, 1 );
199
  }
200
- imagettftext( $im, $this->font_size, mt_rand( -12, 12 ), $x,
201
- $this->base[1] + mt_rand( -2, 2 ), $fg, $font, $char );
202
  $x += $this->font_char_width;
203
  }
204
 
@@ -266,7 +263,7 @@ class SiteGuardReallySimpleCaptcha extends SiteGuard_Base {
266
  return false;
267
  }
268
 
269
- $response = str_replace( array( " ", "\t" ), '', $response );
270
  $response = strtoupper( $response );
271
 
272
  $dir = trailingslashit( $this->tmp_dir );
85
 
86
  $word = '';
87
 
88
+ if ( 'jp' == $this->lang_mode ) {
89
  $this->chars = $chars_jp;
90
  } else {
91
  $this->chars = $chars_en;
114
  $this->cleanup();
115
 
116
  /* Array of fonts. Randomly picked up per character */
117
+ if ( 'jp' == $this->lang_mode ) {
118
  $this->fonts = array(
119
  dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-black.ttf',
120
  //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-bold.ttf',
179
  imagefill( $im, 0, 0, $bg );
180
 
181
  // randam lines
182
+ for ( $i = 0; $i < 5; $i++ ) {
183
  $color = imagecolorallocate( $im, 196, 196, 196 );
184
+ imageline( $im, mt_rand( 0, $this->img_size[0] - 1 ), mt_rand( 0, $this->img_size[1] - 1 ), mt_rand( 0, $this->img_size[0] - 1 ), mt_rand( 0, $this->img_size[1] - 1 ), $color );
 
 
185
  }
186
 
187
  $x = $this->base[0] + mt_rand( -2, 2 );
195
  } else {
196
  $char = mb_substr( $word, $i, 1 );
197
  }
198
+ imagettftext( $im, $this->font_size, mt_rand( -12, 12 ), $x, $this->base[1] + mt_rand( -2, 2 ), $fg, $font, $char );
 
199
  $x += $this->font_char_width;
200
  }
201
 
263
  return false;
264
  }
265
 
266
+ $response = str_replace( array( ' ', "\t" ), '', $response );
267
  $response = strtoupper( $response );
268
 
269
  $dir = trailingslashit( $this->tmp_dir );
siteguard.php CHANGED
@@ -7,7 +7,7 @@ Author: JP-Secure
7
  Author URI: http://www.jp-secure.com/eng/
8
  Text Domain: siteguard
9
  Domain Path: /languages/
10
- Version: 1.1.1
11
  */
12
 
13
  /* Copyright 2014 JP-Secure Inc
@@ -30,7 +30,7 @@ if ( ! defined( 'ABSPATH' ) ) {
30
  exit;
31
  }
32
 
33
- define( 'SITEGUARD_VERSION', '1.1.1' );
34
 
35
  define( 'SITEGUARD_PATH', plugin_dir_path( __FILE__ ) );
36
  define( 'SITEGUARD_URL_PATH', plugin_dir_url( __FILE__ ) );
7
  Author URI: http://www.jp-secure.com/eng/
8
  Text Domain: siteguard
9
  Domain Path: /languages/
10
+ Version: 1.1.2
11
  */
12
 
13
  /* Copyright 2014 JP-Secure Inc
30
  exit;
31
  }
32
 
33
+ define( 'SITEGUARD_VERSION', '1.1.2' );
34
 
35
  define( 'SITEGUARD_PATH', plugin_dir_path( __FILE__ ) );
36
  define( 'SITEGUARD_URL_PATH', plugin_dir_url( __FILE__ ) );