IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 1976 | 1976 | |
| 1977 | 1977 | $parsed_home = @parse_url( get_option( 'home' ) ); |
| 1978 | 1978 | |
| 1979 | | $same_host = strtolower( $parsed_home['host'] ) === strtolower( $parsed_url['host'] ); |
| | 1979 | $same_host = strcasecmp( $parsed_home['host'], $parsed_url['host'] ) === 0; |
| 1980 | 1980 | |
| 1981 | 1981 | if ( ! $same_host ) { |
| 1982 | 1982 | $host = trim( $parsed_url['host'], '.' ); |
| 1983 | | if ( preg_match( '#^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $host ) ) { |
| 1984 | | $ip = $host; |
| 1985 | | } else { |
| | 1983 | $ip = filter_var( $host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ); |
| | 1984 | if ( ! $ip ) { |
| 1986 | 1985 | $ip = gethostbyname( $host ); |
| 1987 | 1986 | if ( $ip === $host ) // Error condition for gethostbyname() |
| 1988 | 1987 | $ip = false; |
| 1989 | 1988 | } |
| 1990 | 1989 | if ( $ip ) { |
| 1991 | | if ( '127.0.0.1' === $ip ) |
| | 1990 | if ( ! filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_RES_RANGE | FILTER_FLAG_NO_PRIV_RANGE ) ) { |
| 1992 | 1991 | return ''; |
| 1993 | | $parts = array_map( 'intval', explode( '.', $ip ) ); |
| 1994 | | if ( 10 === $parts[0] ) |
| 1995 | | return ''; |
| 1996 | | if ( 172 === $parts[0] && 16 <= $parts[1] && 31 >= $parts[1] ) |
| 1997 | | return ''; |
| 1998 | | if ( 192 === $parts[0] && 168 === $parts[1] ) |
| 1999 | | return ''; |
| 2000 | | } |
| 2001 | | } |
| | 1992 | } |
| | 1993 | } |
| 2002 | 1994 | |
| 2003 | 1995 | if ( empty( $parsed_url['port'] ) ) |
| 2004 | 1996 | return $uri; |
| … |
… |
|
| 2007 | 1999 | if ( 80 === $port || 443 === $port || 8080 === $port ) |
| 2008 | 2000 | return $uri; |
| 2009 | 2001 | |
| 2010 | | if ( $parsed_home && $same_host && $parsed_home['port'] === $port ) |
| | 2002 | if ( $same_host && isset( $parsed_home['port'] ) && $parsed_home['port'] === $port ) |
| 2011 | 2003 | return $uri; |
| 2012 | 2004 | |
| 2013 | 2005 | return ''; |