Go to the source code of this file.
Functions | |
wfGetForwardedFor () | |
Extracts the XFF string from the request header Checks first for "X-Forwarded-For", then "Client-ip" Note: headers are spoofable. | |
wfGetAgent () | |
Returns the browser/OS data from the request header Note: headers are spoofable. | |
wfGetIP () | |
Work out the IP address based on various globals For trusted proxies, use the XFF client IP (first of the chain). | |
wfIsTrustedProxy ($ip) | |
Checks if an IP is a trusted proxy providor Useful to tell if X-Fowarded-For data is possibly bogus Squid cache servers for the site and AOL are whitelisted. | |
wfProxyCheck () | |
Forks processes to scan the originating IP for an open proxy server MemCached can be used to skip IPs that have already been scanned. | |
wfParseCIDR ($range) | |
Convert a network specification in CIDR notation to an integer network and a number of bits. | |
wfIsLocallyBlockedProxy ($ip) | |
Check if an IP address is in the local proxy list. |
Definition in file ProxyTools.php.
wfGetAgent | ( | ) |
Returns the browser/OS data from the request header Note: headers are spoofable.
Definition at line 44 of file ProxyTools.php.
References $_SERVER.
wfGetForwardedFor | ( | ) |
Extracts the XFF string from the request header Checks first for "X-Forwarded-For", then "Client-ip" Note: headers are spoofable.
Definition at line 13 of file ProxyTools.php.
References $_SERVER.
Referenced by wfGetIP().
wfGetIP | ( | ) |
Work out the IP address based on various globals For trusted proxies, use the XFF client IP (first of the chain).
Definition at line 69 of file ProxyTools.php.
References $_SERVER, $i, $wgIP, $wgUsePrivateIPs, IP::canonicalize(), IP::isPublic(), wfDebug(), wfGetForwardedFor(), and wfIsTrustedProxy().
Referenced by LoginForm::addNewAccountInternal(), LoginForm::authenticateUserData(), OutputPage::blockedPage(), Autopromote::checkCondition(), User::getBlockedStatus(), User::getName(), Title::getUserPermissionsErrors(), EditPage::internalAttemptSave(), SpecialVersion::IPInfo(), User::isBlockedGlobally(), User::isPingLimitable(), LoginForm::mailPasswordInternal(), nameAndLogin(), RecentChange::newLogEntry(), RecentChange::notifyEdit(), RecentChange::notifyMove(), RecentChange::notifyNew(), User::pingLimiter(), LoginForm::processLogin(), User::sendConfirmationMail(), LoginForm::userBlockedMessage(), wfProxyCheck(), and wfSpecialBlockme().
wfIsLocallyBlockedProxy | ( | $ | ip | ) |
Check if an IP address is in the local proxy list.
Definition at line 188 of file ProxyTools.php.
References $fname, $wgProxyList, wfProfileIn(), and wfProfileOut().
Referenced by User::getBlockedStatus().
wfIsTrustedProxy | ( | $ | ip | ) |
Checks if an IP is a trusted proxy providor Useful to tell if X-Fowarded-For data is possibly bogus Squid cache servers for the site and AOL are whitelisted.
string | $ip |
Definition at line 122 of file ProxyTools.php.
References $wgSquidServers, $wgSquidServersNoPurge, and wfRunHooks().
Referenced by wfGetIP().
wfParseCIDR | ( | $ | range | ) |
Convert a network specification in CIDR notation to an integer network and a number of bits.
Definition at line 180 of file ProxyTools.php.
References IP::parseCIDR().
wfProxyCheck | ( | ) |
Forks processes to scan the originating IP for an open proxy server MemCached can be used to skip IPs that have already been scanned.
Definition at line 140 of file ProxyTools.php.
References $title, $url, $wgBlockOpenProxies, $wgMemc, $wgProxyKey, $wgProxyMemcExpiry, $wgProxyPorts, $wgProxyScriptPath, SpecialPage::getTitleFor(), wfGetIP(), and wfMemcKey().
Referenced by EditPage::initialiseForm().