Commit graph

80 commits

Author SHA1 Message Date
Aaron Schulz
ab27a284a1 Some xff function cleanup; add a function to get the leftmost ip 2007-04-10 16:07:42 +00:00
Aaron Schulz
ac03a462ff * Add IPv6 support to XFF functions, improve IPv6 regexp 2007-03-12 18:15:58 +00:00
Aaron Schulz
569fa7cf8b *Have user agent return '' rather than NULL 2007-03-09 22:57:25 +00:00
Aaron Schulz
8f5d64dd2c * Added useragent and an xff function and header 2007-02-12 01:02:35 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Ilmari Karonen
fd989dcea6 convert "::1" and other pseudo-IPv6 addresses that Apache may throw at us to their IPv4 counterparts 2006-11-29 08:08:57 +00:00
Tim Starling
a3a6ac13c3 * Added temporary special-case AOL proxy detection, they're automatically counted as trusted proxies for now.
* Removed wfRangeStartEnd() and wfIsAddressInRange() -- avoid proliferation of global functions.
2006-11-25 16:24:44 +00:00
Tim Starling
a3b490d2c4 * Made special page names case-insensitive and localisable. Care has been taken to maintain backwards compatibility.
* Used special page subpages in a few more places, instead of query parameters
2006-10-30 06:25:31 +00:00
Tim Starling
e174a4ddfb Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
2006-10-04 09:06:18 +00:00
Tim Starling
3e50848357 Moved wfParseCIDR() to IP::parseCIDR(). Added IP::parseRange() to support more general range strings. An application for this will hopefully follow soon. 2006-09-24 06:11:21 +00:00
Tim Starling
0ade783ae2 Deferred loading of DateFormatter.php and IP.php. Standardised IP.php function naming style. 2006-07-14 17:02:49 +00:00
Antoine Musso
71fd92d760 Migrate IP related tools from ProxyTools.php to IP.php
and its own class of static functions
2006-07-12 18:33:21 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Brion Vibber
bfe9356a07 * Reject malformed addresses in X-Forwarded-For entries 2006-04-13 01:03:30 +00:00
Domas Mituzas
8aabcc03d1 Be less anal about entry points, class definitions do no harm to anyone, defined() is expensive 2006-01-14 11:04:04 +00:00
Brion Vibber
266d41f165 * Added wfDie() wrapper, and some manual die(-1), to force the return code
to the shell to return nonzero when we crap out with an error.
2006-01-14 02:49:43 +00:00
Niklas Laxström
72bfc638b4 Missing variable declarations 2006-01-10 18:44:39 +00:00
Brion Vibber
96a988f7ec * Protect against spoofing of X-Forwarded-For header 2006-01-07 21:44:10 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec * s~ +$~~ 2006-01-07 13:09:30 +00:00
Ævar Arnfjörð Bjarmason
1d15461a57 Code review!
* Don't start a new scope with if defined 'MEDIAWIKI...
2006-01-07 12:31:39 +00:00
Tim Starling
e03fdc5ac5 Lazy initialisation of wgProxyList, no flip required 2005-12-06 13:24:47 +00:00
Tim Starling
55671d7040 Faster IP blocks. Requires schema change. 2005-12-01 10:37:47 +00:00
Tim Starling
5594172806 PHP 5 compatibility 2005-11-01 07:47:21 +00:00
Tim Starling
9260c3b7ca Deferred initialisation of $wgIP, because it's potentially slow, especially if and when we add the 200 NTL proxies to the trusted XFF list. I was hoping to avoid initialisation altogether for anonymous page views, but that turns out to be difficult because of user_newtalk. It is, however, avoided for action=raw. Tested page view, newtalk, IP registration in history and recentchanges, IP block, autoblock and Special:Version.
Also moved the old proxy scan code from EditPage.php to a more appropriate location in ProxyTools.php.
2005-09-05 02:22:20 +00:00
Antoine Musso
157861bc31 fix some issues with phpdoc 2005-07-05 21:22:25 +00:00
Tim Starling
1b19057db3 oops, committed from wrong branch, this is the fixed version 2005-03-31 10:39:15 +00:00
Tim Starling
50f2612218 fixed bug 2005-03-31 10:37:54 +00:00
Tim Starling
ce4f1221f1 Adding some validation for IP determination via XFF headers, in preparation for adding ISP proxies to the trusted proxy list, which may occasionally give invalid XFF headers 2005-03-31 09:10:25 +00:00