Changeset 3183470
- Timestamp:
- 11/07/2024 12:05:23 AM (13 months ago)
- Location:
- login-rebuilder/trunk
- Files:
-
- 2 edited
-
login-rebuilder.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
login-rebuilder/trunk/login-rebuilder.php
r3146283 r3183470 5 5 Description: This plugin will create a new login page for your site. The new login page can be placed in any directory. You can also create separate login pages for administrators and for other users. 6 6 Author: tmatsuur 7 Version: 2.8. 57 Version: 2.8.6 8 8 Author URI: https://12net.jp/ 9 9 Text Domain: login-rebuilder … … 20 20 define( 'LOGIN_REBUILDER_DOMAIN', 'login-rebuilder' ); 21 21 define( 'LOGIN_REBUILDER_DB_VERSION_NAME', 'login-rebuilder-db-version' ); 22 define( 'LOGIN_REBUILDER_DB_VERSION', '2.8. 3' );22 define( 'LOGIN_REBUILDER_DB_VERSION', '2.8.6' ); 23 23 define( 'LOGIN_REBUILDER_PROPERTIES', 'login-rebuilder' ); 24 24 define( 'LOGIN_REBUILDER_LOGGING_NAME', 'login-rebuilder-logging' ); … … 117 117 if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { 118 118 $remote_addr = $_SERVER['HTTP_CLIENT_IP']; 119 } else if ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {119 } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { 120 120 $ip_array = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] ); 121 121 $remote_addr = $ip_array[0]; 122 122 } else { 123 $remote_addr = $_SERVER['REMOTE_ADDR'];123 $remote_addr = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : self::INVALID_REMOTE_ADDR; // [2.8.6] $_SERVER['REMOTE_ADDR'] not exist. 124 124 } 125 125 $this->remote_addr = preg_match( '/^(([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3,5}([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/', $remote_addr )? $remote_addr: self::INVALID_REMOTE_ADDR; … … 132 132 } elseif ( isset( $_SERVER['SERVER_NAME'] ) ) { 133 133 $this->host_name = $_SERVER['SERVER_NAME']; 134 } else {134 } elseif ( isset( $_SERVER['SERVER_ADDR'] ) ) { // [2.8.6] $_SERVER['SERVER_ADDR'] exists. 135 135 $this->host_name = gethostbyaddr( $_SERVER['SERVER_ADDR'] ); 136 } else { // [2.8.6] $_SERVER['SERVER_ADDR'] not exist. 137 $this->host_name = parse_url( get_site_url(), PHP_URL_HOST ); 136 138 } 137 139 -
login-rebuilder/trunk/readme.txt
r3146283 r3183470 5 5 Requires at least: 3.2.0 6 6 Requires PHP: 5.6 7 Tested up to: 6. 6.18 Stable tag: 2.8. 57 Tested up to: 6.7.0 8 Stable tag: 2.8.6 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 95 95 == Changelog == 96 96 97 = 2.8.6 = 98 * Bug fix: Adjusted what is applied to internally stored hostnames when SERVER['SERVER_ADDR'] does not exist. 99 97 100 = 2.8.5 = 98 101 * Bug fix: Adjusted what is applied to internally stored hostnames when SERVER['HTTP_HOST'] does not exist.
Note: See TracChangeset
for help on using the changeset viewer.