Lines Matching +full:server +full:-

59         $maskLengthLower = max(0, $maskLength - 64);
67 $maskUpper = ~0 << intval(64 - $maskLengthUpper);
68 $maskLower = ~0 << intval(64 - $maskLengthLower);
87 * - version: Either '4' or '6'.
88 * - upper: The upper 64 bits of the IP.
89 * - lower: The lower 64 bits of the IP.
121 if (PHP_INT_SIZE == 4) { // 32-bit
123 } else { // 64-bit arch
158 * Given the IP address of a proxy server, determine whether it is
159 * a known and trusted server.
187 * request has passed through, according to the X-Forwarded-For header.
190 * X-Forwarded-For header must be trusted, as well as the TCP/IP endpoint
206 $forwardedFor = $INPUT->server->str('HTTP_X_FORWARDED_FOR');
213 $remoteAddr = $INPUT->server->str('REMOTE_ADDR');
215 // Get the client address from the X-Forwarded-For header.
216 // X-Forwarded-For: <client> [, <proxy>]...
222 // The remaining items are the proxies through which the X-Forwarded-For
243 * - The custom IP header if $conf[client_ip_header] is set.
244 * - The X-Forwarded-For header if all the proxies are trusted by $conf[trustedproxy].
245 * - The TCP/IP connection remote address.
246 * - 0.0.0.0 if all else fails.
249 * is being added by the web server, otherwise it may be spoofed by the client.
251 * The 'trustedproxy' setting must not allow any IP, otherwise the X-Forwarded-For
266 * - The custom IP header if $conf[client_ip_header] is set.
267 * - The X-Forwarded-For header if all the proxies are trusted by $conf[trustedproxies].
268 * - The TCP/IP connection remote address.
269 * - 0.0.0.0 if all else fails.
282 …if (!empty($conf['client_ip_header']) && $INPUT->server->str('HTTP_' . $conf['client_ip_header']))…
283 $ips[] = $INPUT->server->str('HTTP_' . $conf['client_ip_header']);
286 // Add the X-Forwarded-For addresses if all proxies are trusted.
290 $ips[] = $INPUT->server->str('REMOTE_ADDR');
307 * Get the host name of the server.
311 * - The X-Forwarded-Host header if it exists and the proxies are trusted.
312 * - The HTTP_HOST header.
313 * - The SERVER_NAME header.
314 * - The system's host name.
316 * @return string Returns the host name of the server.
323 $remoteAddr = $INPUT->server->str('REMOTE_ADDR');
324 if ($INPUT->server->str('HTTP_X_FORWARDED_HOST') && self::proxyIsTrusted($remoteAddr)) {
325 return $INPUT->server->str('HTTP_X_FORWARDED_HOST');
326 } elseif ($INPUT->server->str('HTTP_HOST')) {
327 return $INPUT->server->str('HTTP_HOST');
328 } elseif ($INPUT->server->str('SERVER_NAME')) {
329 return $INPUT->server->str('SERVER_NAME');
338 * Will use the X-Forwarded-Proto header if it exists and the proxies are trusted, otherwise
348 $remoteAddr = $INPUT->server->str('REMOTE_ADDR');
349 if ($INPUT->server->has('HTTP_X_FORWARDED_PROTO') && self::proxyIsTrusted($remoteAddr)) {
350 return $INPUT->server->str('HTTP_X_FORWARDED_PROTO') === 'https';
352 return !preg_match('/^(|off|false|disabled)$/i', $INPUT->server->str('HTTPS', 'off'));