PluginProbe ʕ •ᴥ•ʔ
SiteGuard WP Plugin / 1.2.2
SiteGuard WP Plugin v1.2.2
1.8.7 1.8.6 1.8.6-beta1 1.8.6-beta2 1.8.4 1.8.5 1.8.3 1.8.2 1.8.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.4.3 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.7.0 1.7.1 1.7.10 1.7.11 1.7.12 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.0-beta1 1.8.0-beta2 1.8.0-beta3 1.8.0-beta4
siteguard / admin / siteguard-menu-same-error.php
siteguard / admin Last commit date
siteguard-login-history-table.php 11 years ago siteguard-menu-admin-filter.php 11 years ago siteguard-menu-captcha.php 11 years ago siteguard-menu-dashboard.php 11 years ago siteguard-menu-disable-pingback.php 11 years ago siteguard-menu-fail-once.php 11 years ago siteguard-menu-init.php 11 years ago siteguard-menu-login-alert.php 11 years ago siteguard-menu-login-lock.php 11 years ago siteguard-menu-rename-login.php 11 years ago siteguard-menu-same-error.php 11 years ago siteguard-menu-updates-notify.php 11 years ago siteguard-menu-waf-tuning-support.php 11 years ago siteguard-waf-exclude-rule-table.php 11 years ago
siteguard-menu-same-error.php
99 lines
1 <?php
2
3 class SiteGuard_Menu_Same_Error extends SiteGuard_Base {
4 function __construct( ) {
5 $this->render_page( );
6 }
7 function render_page( ) {
8 global $config, $captcha;
9
10 $opt_name_enable = 'same_login_error';
11
12 $opt_val_enable = $config->get( $opt_name_enable );
13 if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-same-error-submit' ) ) {
14 $error = false;
15 $errors = check_multisite( );
16 if ( is_wp_error( $errors ) ) {
17 echo '<div class="error settings-error"><p><strong>';
18 esc_html_e( $errors->get_error_message( ), 'siteguard' );
19 echo '</strong></p></div>';
20 $error = true;
21 }
22 if ( false == $error && '1' == $_POST[ $opt_name_enable ] ) {
23 $ret = $captcha->check_requirements( );
24 if ( is_wp_error( $ret ) ) {
25 echo '<div class="error settings-error"><p><strong>' . $ret->get_error_message( ) . '</strong></p></div>';
26 $error = true;
27 $config->set( $opt_name_enable, '0' );
28 $config->update( );
29 }
30 }
31 if ( false == $error && false == $this->is_switch_value( $_POST[ $opt_name_enable ] ) ) {
32 echo '<div class="error settings-error"><p><strong>';
33 esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
34 echo '</strong></p></div>';
35 $error = true;
36 }
37 if ( false == $error ) {
38 $opt_val_enable = $_POST[ $opt_name_enable ];
39 $config->set( $opt_name_enable, $opt_val_enable );
40 $config->update( );
41 ?>
42 <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
43 <?php
44 }
45 }
46
47 echo '<div class="wrap">';
48 echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
49 echo '<h2>' . esc_html__( 'Same Login Error Message', 'siteguard' ) . '</h2>';
50 echo '<div class="siteguard-description">'
51 . esc_html__( 'You can find docs about this function on ', 'siteguard' )
52 . '<a href="' . esc_html__( 'http://www.jp-secure.com/cont/products/siteguard_wp_plugin/same_error_en.html', 'siteguard' )
53 . '" target="_blank">'
54 . esc_html__( 'here', 'siteguard' )
55 . '</a>'
56 . esc_html__( '.', 'siteguard' )
57 . '</div>';
58 ?>
59 <form name="form1" method="post" action="">
60 <table class="form-table">
61 <tr>
62 <th scope="row" colspan="2">
63 <ul class="siteguard-radios">
64 <li>
65 <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_enable ? 'checked' : '') ?> >
66 <label for="<?php echo $opt_name_enable.'_on' ?>"><?php esc_html_e( 'ON', 'siteguard' ) ?></label>
67 </li><li>
68 <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_enable ? 'checked' : '') ?> >
69 <label for="<?php echo $opt_name_enable.'_off' ?>"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
70 </li>
71 </ul>
72 <?php
73 $error = check_multisite( );
74 if ( is_wp_error( $error ) ) {
75 echo '<p class="description">';
76 echo $error->get_error_message( );
77 echo '</p>';
78 }
79 ?>
80 </th>
81 </tr>
82 </table>
83 <input type="hidden" name="update" value="Y">
84 <div class="siteguard-description">
85 <?php esc_html_e( 'It is the function to decrease the vulnerability against the attack to examine if a user name exists. All error messages about the login should be equalized. The single error message is displayed even if anyone of a username, password, or CAPTCHA is wrong.', 'siteguard' ) ?>
86 </div>
87 <hr />
88
89 <?php
90 wp_nonce_field( 'siteguard-menu-same-error-submit' );
91 submit_button();
92 ?>
93 </form>
94 </div>
95 <?php
96 }
97 }
98 ?>
99