PluginProbe ʕ •ᴥ•ʔ
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) / 9.5.11
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) v9.5.11
9.6.0 9.5.11 9.5.10.1 9.5.10 trunk 9.4.0 9.4.1 9.4.2 9.4.3 9.5.0 9.5.0.1 9.5.0.2 9.5.1 9.5.2 9.5.2.2 9.5.2.3 9.5.3 9.5.3.1 9.5.3.2 9.5.4 9.5.5 9.5.6 9.5.7 9.5.8 9.5.9
really-simple-ssl / security / wordpress / prevent-login-info-leakage.php
really-simple-ssl / security / wordpress Last commit date
two-fa 1 month ago vulnerabilities 1 month ago block-code-execution-uploads.php 1 month ago disable-xmlrpc.php 1 month ago display-name-is-login-name.php 1 month ago file-editing.php 1 month ago hide-wp-version.php 1 month ago index.php 1 month ago prevent-login-info-leakage.php 1 month ago rename-admin-user.php 1 month ago rest-api.php 1 month ago user-enumeration.php 1 month ago user-registration.php 1 month ago
prevent-login-info-leakage.php
48 lines
1 <?php
2 defined('ABSPATH') or die();
3 /**
4 * Override default login error message
5 * @return string|void
6 **/
7 function rsssl_no_wp_login_errors()
8 {
9 return __("Invalid login details.", "really-simple-ssl");
10 }
11 add_filter( 'login_errors', 'rsssl_no_wp_login_errors' );
12
13 /**
14 * Hide feedback entirely on password reset (no filter available).
15 *
16 * @return void
17 *
18 */
19 function rsssl_hide_pw_reset_error() {
20 ?>
21 <style>
22 .login-action-lostpassword #login_error{
23 display: none;
24 }
25 </style>
26 <?php
27 }
28 add_action( 'login_enqueue_scripts', 'rsssl_hide_pw_reset_error' );
29
30 /**
31 *
32 * Clear username when username is valid but password is incorrect
33 *
34 * @return void
35 */
36 function rsssl_clear_username_on_correct_username() {
37 ?>
38 <script>
39 if ( document.getElementById('login_error') ) {
40 let userLogin = document.getElementById('user_login');
41 userLogin.value = '';
42 userLogin.setAttribute('value', '');
43 }
44 </script>
45 <?php
46 }
47 add_action( 'login_footer', 'rsssl_clear_username_on_correct_username' );
48