PluginProbe ʕ •ᴥ•ʔ
SiteGuard WP Plugin / 1.0.2
SiteGuard WP Plugin v1.0.2
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-lock.php 11 years ago siteguard-menu-rename-login.php 11 years ago siteguard-menu-same-error.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
77 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 if ( '1' == $_POST[ $opt_name_enable ] ) {
16 $ret = $captcha->check_requirements( );
17 if ( is_wp_error( $ret ) ) {
18 echo '<div class="error settings-error"><p><strong>' . $ret->get_error_message( ) . '</strong></p></div>';
19 $error = true;
20 $config->set( $opt_name_enable, '0' );
21 $config->update( );
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;
29 }
30 if ( false == $error ) {
31 $opt_val_enable = $_POST[ $opt_name_enable ];
32 $config->set( $opt_name_enable, $opt_val_enable );
33 $config->update( );
34 ?>
35 <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
36 <?php
37 }
38 }
39
40 echo '<div class="wrap">';
41 echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
42 echo '<h2>' . esc_html__( 'Same Login Error Message', 'siteguard' ) . '</h2>';
43 ?>
44 <form name="form1" method="post" action="">
45 <table class="form-table">
46 <tr>
47 <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
48 <td>
49 <ul class="siteguard-radios">
50 <li>
51 <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' : '') ?> >
52 <label for="<?php echo $opt_name_enable.'_on' ?>"><?php esc_html_e( 'ON', 'siteguard' ) ?></label>
53 </li><li>
54 <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' : '') ?> >
55 <label for="<?php echo $opt_name_enable.'_off' ?>"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
56 </li>
57 </ul>
58 </td>
59 </tr>
60 </table>
61 <input type="hidden" name="update" value="Y">
62 <div class="siteguard-description">
63 <?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' ) ?>
64 </div>
65 <hr />
66
67 <?php
68 wp_nonce_field( 'siteguard-menu-same-error-submit' );
69 submit_button();
70 ?>
71 </form>
72 </div>
73 <?php
74 }
75 }
76 ?>
77