Changeset 37115 for trunk/src/wp-includes/http.php
- Timestamp:
- 03/30/2016 03:37:26 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/http.php
r36870 r37115 524 524 $parsed_home = @parse_url( get_option( 'home' ) ); 525 525 526 if ( isset( $parsed_home['host'] ) ) { 526 if ( isset( $parsed_home['host'] ) ) { 527 527 $same_host = ( strtolower( $parsed_home['host'] ) === strtolower( $parsed_url['host'] ) || 'localhost' === strtolower( $parsed_url['host'] ) ); 528 528 } else { … … 532 532 if ( ! $same_host ) { 533 533 $host = trim( $parsed_url['host'], '.' ); 534 if ( preg_match( '#^ \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $host ) ) {534 if ( preg_match( '#^(([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)\.){3}([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)$#', $host ) ) { 535 535 $ip = $host; 536 536 } else {
Note: See TracChangeset
for help on using the changeset viewer.