Changeset 755702
- Timestamp:
- 08/13/2013 05:10:08 PM (13 years ago)
- Location:
- wordpress-by-circle-tree/trunk
- Files:
-
- 2 edited
-
includes/class.wp_login_lockdown.php (modified) (3 diffs)
-
wordpress-by-circletree.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-by-circle-tree/trunk/includes/class.wp_login_lockdown.php
r743380 r755702 48 48 'root' 49 49 ); 50 private function get_blacklisted_usernames () 51 { 52 $defaults = $this->admin_usernames; 53 $usernames_string = $this->get_setting('blacklisted_admin_usernames'); 54 $usernames_array = array(); 55 if ($usernames_string != '') { 56 $usernames_array = explode(',', $usernames_string); 57 } 58 return array_merge($usernames_array, $defaults); 59 } 50 60 /** 51 61 * Registered Settings … … 252 262 'label' => 'Blacklist IPs using the Admin User Account', 253 263 'tooltip' => 'Automatically block IP addresses that attempt to login ' . //Make sure you concat long strings! 254 'using ('.rtrim(implode(', ', $this-> admin_usernames), ', ').') usernames',264 'using ('.rtrim(implode(', ', $this->get_blacklisted_usernames()), ', ').') usernames', 255 265 'default' => true 266 ), 267 array( 268 'name' => 'blacklisted_admin_usernames', 269 'type' => 'text', 270 'size' => 80, 271 'label' => 'Additional Blacklisted Usernames', 272 'tooltip' => 'CSV Usernames to automatically blacklist', 256 273 ), 257 274 array( … … 397 414 public function login_failed ($username) { 398 415 if ( $this->get_setting('blacklist_admin') ) { 399 if (in_array(trim(strtolower($username)), $this-> admin_usernames)) {416 if (in_array(trim(strtolower($username)), $this->get_blacklisted_usernames())) { 400 417 $this->block_ip(self::$remote_ip); 401 418 $this->log('Blacklisted Username', $username, self::$remote_ip); -
wordpress-by-circle-tree/trunk/wordpress-by-circletree.php
r743399 r755702 5 5 Description: Secure Login Screen for Circle Tree powered websites 6 6 Author: Circle Tree, LLC 7 Version: 3.0. 27 Version: 3.0.3 8 8 Author URI: http://mycircletree.com/ 9 9 */
Note: See TracChangeset
for help on using the changeset viewer.