Changeset 3297390
- Timestamp:
- 05/20/2025 12:51:06 PM (7 months ago)
- Location:
- protect-login
- Files:
-
- 8 added
- 43 edited
- 1 copied
-
assets/icon.svg (modified) (1 diff)
-
tags/1.4.6 (copied) (copied from protect-login/trunk)
-
tags/1.4.6/assets/css/copy-to-clipboard.css (added)
-
tags/1.4.6/assets/js/protect-login-ctc.js (added)
-
tags/1.4.6/includes/multisite-functions.php (modified) (8 diffs)
-
tags/1.4.6/includes/plugincheck.php (added)
-
tags/1.4.6/includes/setup.php (modified) (5 diffs)
-
tags/1.4.6/modules/LimitLoginAttempts/Actions/class-cleanupaddresses.php (modified) (1 diff)
-
tags/1.4.6/modules/LimitLoginAttempts/Controllers/class-loginhandler.php (modified) (4 diffs)
-
tags/1.4.6/modules/LimitLoginAttempts/Controllers/class-optionspage.php (modified) (4 diffs)
-
tags/1.4.6/modules/LimitLoginAttempts/Controllers/class-restapi.php (modified) (1 diff)
-
tags/1.4.6/modules/LimitLoginAttempts/Views/Components/readonly-label.php (modified) (1 diff)
-
tags/1.4.6/modules/LimitLoginAttempts/Views/Components/text-element.php (modified) (1 diff)
-
tags/1.4.6/modules/LimitLoginAttempts/Views/Partials/print-allowlist.php (modified) (1 diff)
-
tags/1.4.6/modules/LimitLoginAttempts/Views/Partials/print-blocklist.php (modified) (1 diff)
-
tags/1.4.6/modules/LimitLoginAttempts/Views/Partials/print-lockedout-list.php (modified) (1 diff)
-
tags/1.4.6/modules/LimitLoginAttempts/Views/Partials/print-optionspage.php (modified) (2 diffs)
-
tags/1.4.6/modules/LimitLoginAttempts/Views/Partials/print-passwordpage.php (modified) (2 diffs)
-
tags/1.4.6/modules/LimitLoginAttempts/Views/Partials/print-remoteapisettings.php (modified) (2 diffs)
-
tags/1.4.6/modules/LimitLoginAttempts/includes/gui-elements.php (modified) (1 diff)
-
tags/1.4.6/modules/LimitLoginAttempts/includes/lib.php (modified) (8 diffs)
-
tags/1.4.6/modules/LimitLoginAttempts/includes/validators.php (modified) (2 diffs)
-
tags/1.4.6/modules/RemoteApi/Actions/class-apiclient.php (modified) (3 diffs)
-
tags/1.4.6/modules/RemoteApi/includes/form-elements.php (modified) (2 diffs)
-
tags/1.4.6/phpstan.neon (added)
-
tags/1.4.6/protect-login.php (modified) (2 diffs)
-
tags/1.4.6/readme.txt (modified) (3 diffs)
-
trunk/assets/css/copy-to-clipboard.css (added)
-
trunk/assets/js/protect-login-ctc.js (added)
-
trunk/includes/multisite-functions.php (modified) (8 diffs)
-
trunk/includes/plugincheck.php (added)
-
trunk/includes/setup.php (modified) (5 diffs)
-
trunk/modules/LimitLoginAttempts/Actions/class-cleanupaddresses.php (modified) (1 diff)
-
trunk/modules/LimitLoginAttempts/Controllers/class-loginhandler.php (modified) (4 diffs)
-
trunk/modules/LimitLoginAttempts/Controllers/class-optionspage.php (modified) (4 diffs)
-
trunk/modules/LimitLoginAttempts/Controllers/class-restapi.php (modified) (1 diff)
-
trunk/modules/LimitLoginAttempts/Views/Components/readonly-label.php (modified) (1 diff)
-
trunk/modules/LimitLoginAttempts/Views/Components/text-element.php (modified) (1 diff)
-
trunk/modules/LimitLoginAttempts/Views/Partials/print-allowlist.php (modified) (1 diff)
-
trunk/modules/LimitLoginAttempts/Views/Partials/print-blocklist.php (modified) (1 diff)
-
trunk/modules/LimitLoginAttempts/Views/Partials/print-lockedout-list.php (modified) (1 diff)
-
trunk/modules/LimitLoginAttempts/Views/Partials/print-optionspage.php (modified) (2 diffs)
-
trunk/modules/LimitLoginAttempts/Views/Partials/print-passwordpage.php (modified) (2 diffs)
-
trunk/modules/LimitLoginAttempts/Views/Partials/print-remoteapisettings.php (modified) (2 diffs)
-
trunk/modules/LimitLoginAttempts/includes/gui-elements.php (modified) (1 diff)
-
trunk/modules/LimitLoginAttempts/includes/lib.php (modified) (8 diffs)
-
trunk/modules/LimitLoginAttempts/includes/validators.php (modified) (2 diffs)
-
trunk/modules/RemoteApi/Actions/class-apiclient.php (modified) (3 diffs)
-
trunk/modules/RemoteApi/includes/form-elements.php (modified) (2 diffs)
-
trunk/phpstan.neon (added)
-
trunk/protect-login.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
protect-login/assets/icon.svg
r3139807 r3297390 3 3 <svg width="100%" height="100%" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> 4 4 <g transform="matrix(0.997261,0,0,0.996707,0.164893,9.49023e-06)"> 5 <rect x="-0.165" y="0.003" width="64.176" height="64.211" style="fill:rgb( 8,23,39);"/>5 <rect x="-0.165" y="0.003" width="64.176" height="64.211" style="fill:rgb(56,88,233);"/> 6 6 </g> 7 <g transform="matrix(1.51148,0,0,1.51148,-12.6137,-18.287)"> 8 <g transform="matrix(1,0,0,1,16.058,18.4805)"> 9 <path d="M25.404,6.506L14.715,0.335C13.94,-0.11 12.991,-0.11 12.216,0.335L1.532,6.506C0.757,6.951 0.283,7.776 0.283,8.67L0.283,21.008C0.283,21.903 0.757,22.727 1.532,23.172L12.216,29.344C12.991,29.789 13.94,29.789 14.715,29.344L25.399,23.172C26.173,22.727 26.648,21.903 26.648,21.008L26.648,8.67C26.648,7.776 26.173,6.951 25.399,6.506L25.404,6.506ZM23.655,20.719L13.47,26.6L3.286,20.719L3.286,8.955L13.465,3.073L23.65,8.955L23.65,20.719L23.655,20.719Z" style="fill:rgb(254,198,0);fill-rule:nonzero;"/> 10 </g> 11 <g transform="matrix(1,0,0,1,16.058,18.4805)"> 12 <path d="M7.294,10.404C6.829,10.674 6.544,11.169 6.544,11.704L6.544,17.97C6.544,18.505 6.829,19 7.294,19.269L12.721,22.403C13.186,22.672 13.755,22.672 14.22,22.403L19.647,19.269C20.112,19 20.397,18.505 20.397,17.97L20.397,11.704C20.397,11.169 20.112,10.674 19.647,10.404L14.22,7.271C13.755,7.001 13.186,7.001 12.721,7.271L7.294,10.404Z" style="fill:rgb(254,198,0);fill-rule:nonzero;"/> 7 <g transform="matrix(2.65142,0,0,2.65142,5.40838,5.61059)"> 8 <g id="shield-alt"> 9 <g> 10 <path d="M10,2C10,2 13,4 17,4C17,15 10,18 10,18C10,18 3,15 3,4C7,4 10,2 10,2Z" style="fill:white;fill-rule:nonzero;"/> 11 </g> 13 12 </g> 14 13 </g> -
protect-login/tags/1.4.6/includes/multisite-functions.php
r3210527 r3297390 28 28 $sites = get_sites(); 29 29 foreach ( $sites as $site ) { 30 switch_to_blog( $site->blog_id );30 switch_to_blog( (int) $site->blog_id ); 31 31 update_option( $option_name, $option_value ); 32 32 restore_current_blog(); … … 48 48 $sites = get_sites(); 49 49 foreach ( $sites as $site ) { 50 switch_to_blog( $site->blog_id );50 switch_to_blog( (int) $site->blog_id ); 51 51 delete_option( $option_name ); 52 52 restore_current_blog(); … … 70 70 $sites = get_sites(); 71 71 foreach ( $sites as $site ) { 72 switch_to_blog( $site->blog_id );72 switch_to_blog( (int) $site->blog_id ); 73 73 foreach ( get_users() as $current_user ) { 74 74 delete_user_meta( $current_user->ID, $option_name ); … … 97 97 $sites = get_sites(); 98 98 foreach ( $sites as $site ) { 99 switch_to_blog( $site->blog_id );99 switch_to_blog( (int) $site->blog_id ); 100 100 set_transient( $option_name, $option_value, $expiration ); 101 101 restore_current_blog(); … … 117 117 $sites = get_sites(); 118 118 foreach ( $sites as $site ) { 119 switch_to_blog( $site->blog_id );119 switch_to_blog( (int) $site->blog_id ); 120 120 delete_transient( $option_name ); 121 121 restore_current_blog(); … … 142 142 $sites = get_sites(); 143 143 foreach ( $sites as $site ) { 144 switch_to_blog( $site->blog_id );144 switch_to_blog( (int) $site->blog_id ); 145 145 if ( 'blocklist' === $list_type ) { 146 146 OptionsPage::add_to_blocklist( $address ); … … 167 167 $sites = get_sites(); 168 168 foreach ( $sites as $site ) { 169 switch_to_blog( $site->blog_id );169 switch_to_blog( (int) $site->blog_id ); 170 170 LoginHandler::lockout( $address ); 171 171 restore_current_blog(); … … 187 187 $sites = get_sites(); 188 188 foreach ( $sites as $site ) { 189 switch_to_blog( $site->blog_id );189 switch_to_blog( (int) $site->blog_id ); 190 190 OptionsPage::release_ip( $address ); 191 191 restore_current_blog(); -
protect-login/tags/1.4.6/includes/setup.php
r3221659 r3297390 20 20 21 21 require_once __DIR__ . '/environment.php'; 22 require_once __DIR__ . '/plugincheck.php'; 22 23 23 24 require_once PROTECT_LOGIN_PATH . '/datatypes/class-ip-address.php'; … … 75 76 protect_login_password_section(); 76 77 protect_login_2fa_section(); 77 protect_login_remote_api_section();78 78 protect_login_clear_cookies_on_activation(); 79 79 } … … 129 129 * Function to load individual .js - Files in /assets/js/ 130 130 * 131 * @return void131 * @return bool 132 132 */ 133 133 function protect_login_enqueue_custom_password_js() { … … 149 149 $page = $page[0]; 150 150 151 if ( in_array( $page, array( 'profile.php', 'user-edit.php' ), true ) ) { 151 if ( 152 in_array( $page, array( 'profile.php', 'user-edit.php' ), true ) && 153 !protect_login_check_if_conflicting_pugin_found() 154 ) { 152 155 wp_enqueue_script( 153 156 'custom-password-js', … … 170 173 171 174 wp_enqueue_style( 'protect-login-css', PROTECT_LOGIN_URL . '/assets/css/protect-login.css', array(), $plugin_data['Version'], ); 175 return true; 172 176 } 173 177 -
protect-login/tags/1.4.6/modules/LimitLoginAttempts/Actions/class-cleanupaddresses.php
r3210527 r3297390 34 34 $new_lockouts[ $current_lockout ] = $lockout_end; 35 35 } else { 36 $api->remove( );36 $api->remove( $current_lockout, 'blocklist' ); 37 37 } 38 38 } -
protect-login/tags/1.4.6/modules/LimitLoginAttempts/Controllers/class-loginhandler.php
r3252173 r3297390 18 18 */ 19 19 class LoginHandler { 20 /**21 * Contains the class instance22 *23 * @var null24 */25 private static $instance = null;26 27 20 public const DIRECT_ADDR = 'REMOTE_ADDR'; 28 21 public const PROXY_ADDR = 'HTTP_X_FORWARDED_FOR'; … … 35 28 public static function get_instance(): LoginHandler { 36 29 \protect_login_ensure_activation(); 37 if ( null === self::$instance ) { 38 self::$instance = new LoginHandler(); 39 } 40 41 return self::$instance; 30 return new LoginHandler(); 42 31 } 43 32