Last modified: 2007-04-05 20:51:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10290, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8290 - Have CheckUser scan HTTP user-agent header
Have CheckUser scan HTTP user-agent header
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CheckUser (Other open bugs)
unspecified
All All
: Normal enhancement with 5 votes (vote)
: ---
Assigned To: Aaron Schulz
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-17 12:28 UTC by Invalid Account
Modified: 2007-04-05 20:51 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Modifications to MySQL5 tables (77.32 KB, patch)
2006-12-26 06:22 UTC, Aaron Schulz
Details
Patch to add rc_agent to recent changes (7.17 KB, patch)
2006-12-26 06:25 UTC, Aaron Schulz
Details
Patch to add HTTP header user agent checking to checkuser (5.02 KB, patch)
2006-12-26 06:26 UTC, Aaron Schulz
Details
Updater maintenance "arhive" stuff (672 bytes, patch)
2006-12-26 06:38 UTC, Aaron Schulz
Details
Summary patch for HTTP header, XFF info, and searching deleted edits (34.57 KB, patch)
2006-12-31 19:18 UTC, Aaron Schulz
Details
Add sql archive files, minor fixes (36.82 KB, patch)
2006-12-31 22:05 UTC, Aaron Schulz
Details
ChangesList - make archived RC entries wrapped in deleted-rev CSS (2.88 KB, patch)
2007-01-01 00:41 UTC, Aaron Schulz
Details
Summary patch - fix date bug, make radio buttons larger (40.13 KB, patch)
2007-01-03 12:45 UTC, Aaron Schulz
Details
Summary patch - update (40.56 KB, patch)
2007-01-11 01:03 UTC, Aaron Schulz
Details
Alternate patch - seperate checkuser table (44.28 KB, patch)
2007-01-20 07:18 UTC, Aaron Schulz
Details
Separate table (43.02 KB, patch)
2007-01-20 07:24 UTC, Aaron Schulz
Details
Separate table patch (46.80 KB, patch)
2007-01-21 21:43 UTC, Aaron Schulz
Details
Separate table patch (47.16 KB, patch)
2007-01-22 00:31 UTC, Aaron Schulz
Details
Separate table patch (47.16 KB, patch)
2007-01-22 01:08 UTC, Aaron Schulz
Details
Separate table patch (47.18 KB, patch)
2007-01-22 02:01 UTC, Aaron Schulz
Details
Separate table patch (47.19 KB, patch)
2007-01-22 17:16 UTC, Aaron Schulz
Details
Separate table summary patch (51.13 KB, patch)
2007-01-27 21:07 UTC, Aaron Schulz
Details
Separate table summary patch (50.42 KB, patch)
2007-01-29 01:21 UTC, Aaron Schulz
Details
Separate table summary patch (50.18 KB, patch)
2007-02-01 23:01 UTC, Aaron Schulz
Details
Separate table summary patch (50.23 KB, patch)
2007-02-04 05:29 UTC, Aaron Schulz
Details
Separate table summary patch (36.50 KB, patch)
2007-02-06 19:55 UTC, Aaron Schulz
Details
For convenience, diff against current trunk (ProxyTools changes already applied, and one line change elsewhere) (34.58 KB, patch)
2007-02-14 01:12 UTC, Brion Vibber
Details
Couple tweaks for notices and whitespace (34.24 KB, patch)
2007-02-14 01:29 UTC, Brion Vibber
Details
Have log always show (34.16 KB, patch)
2007-02-14 01:44 UTC, Aaron Schulz
Details
Re-add some messages that were lost (33.58 KB, patch)
2007-02-14 18:20 UTC, Aaron Schulz
Details
Update, use IPv6 functions (35.60 KB, patch)
2007-03-12 17:03 UTC, Aaron Schulz
Details
Use hex instead (35.37 KB, patch)
2007-03-13 04:57 UTC, Aaron Schulz
Details

Description Invalid Account 2006-12-17 12:28:16 UTC
I think if CheckUser scanned HTTP header "User Agent", it would be even better because User Agent also 
includes people's browser, operating system, and what browser extentions (sometimes) they have.
Comment 1 Pill 2006-12-17 12:30:29 UTC
(In reply to comment #0)
> I think if CheckUser scanned HTTP header "User Agent", it would be even better
because User Agent also 
> includes people's browser, operating system, and what browser extentions
(sometimes) they have.

And why should that be helpful?
Comment 2 Rob Church 2006-12-17 14:56:25 UTC
That data isn't stored anywhere, so CheckUser can't actually access it, and
storing it would probably cause a privacy stink.
Comment 3 Invalid Account 2006-12-17 15:53:01 UTC
You can view all your HTTP headers at http://www.ioerror.us/ip/headers

That sort of thing can also detect proxies.

As for User Agent, it's not so much privacy since browsers do report that. A few can alter it, but 
most can't and most can't alter the Operating System part. When you email eBay within their website 
and they reply, you automatically see your user agent is printed out on one of the lines sent in the 
email (for some reason?). MediaWiki software also appears to check that to give the right skin pages.

Comment 4 Rob Church 2006-12-17 17:30:25 UTC
You can also fake a user agent.
Comment 5 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-12-17 19:13:19 UTC
Which doesn't negate the fact that most people don't know how or it wouldn't
occur to them, so this would remain useful regardless.  You can also fake IP
addresses, after all.  This seems like a good idea.
Comment 6 Rob Church 2006-12-17 19:38:17 UTC
Fair enough. This will require a schema change to add a column to recentchanges
to store the user agent.
Comment 7 Aaron Schulz 2006-12-26 06:22:42 UTC
Created attachment 2953 [details]
Modifications to MySQL5 tables
Comment 8 Aaron Schulz 2006-12-26 06:25:10 UTC
Created attachment 2954 [details]
Patch to add rc_agent to recent changes

Changes to Recentchange.php, minor argument changes to article/logpage.php, new
$wgPutAgentinRC var is defaultsetttings.php
Comment 9 Aaron Schulz 2006-12-26 06:26:06 UTC
Created attachment 2955 [details]
Patch to add HTTP header user agent checking to checkuser
Comment 10 Aaron Schulz 2006-12-26 06:38:29 UTC
Created attachment 2956 [details]
Updater maintenance "arhive" stuff

Also a file named "patch-rc_agent.sql" is needed, containing:

-- Adding the rc_agent field for logging client info in recentchanges

ALTER TABLE /*$wgDBprefix*/recentchanges 
  ADD rc_agent varchar(255) NOT NULL default '';
Comment 11 Aaron Schulz 2006-12-31 19:18:42 UTC
Created attachment 2993 [details]
Summary patch for HTTP header, XFF info, and searching deleted edits

Since header/foward unfo and deleted edit patches change the same areas, its
easier to do both.

rc_agent, rc_xff and rc_archived columns are added to recent changes.

rc_archived is used to hide deleted edits from RC rather than have them deleted
by article.php on page archival. Undeleted entries that are still new will
become visible again (wich they don't currently) as they should.
Comment 12 Aaron Schulz 2006-12-31 22:05:14 UTC
Created attachment 2994 [details]
Add sql archive files, minor fixes
Comment 13 Aaron Schulz 2007-01-01 00:41:31 UTC
Created attachment 2995 [details]
ChangesList - make archived RC entries wrapped in deleted-rev CSS

This just makes it more clear should deleted edits appear in the results
(checkuser should be the only thing that includes them).
Comment 14 Connel MacKenzie 2007-01-01 07:53:26 UTC
Stupid question here:  Since you'll be recognizing the XFF information now, will
auto-blocks also use this info?  That is, when an AOL user is blocked, will it
be that IP or the XFF that is auto-blocked?  (How detailed is the AOL XFF
header, anyway?  Just dial-up sessions, or [hashed] AOL username specific?)
Comment 15 Connel MacKenzie 2007-01-01 08:11:37 UTC
Oh, and THANK YOU FOR INCLUDING DELETED EDITS!  Thank you, thank you, thank you!
 May all the blessings of our creator rain down upon you and yours!  Wonderful!
 Magnificent!  Thank you!

Ahem.

That is to say, well done.  Bravo.
Comment 16 Rob Church 2007-01-01 09:46:58 UTC
It might be better to combine the User Agent and X-Forwarded-For chain in a
single column in some manner. This would then make it easier to add further data
in the future, for example.
Comment 17 Invalid Account 2007-01-03 05:08:29 UTC
Yes, definitely the X-Forwareded.  There's actually several of these ones like X-Originating IP.  I 
believe there are five.

There'a Bluecoat-Forwarded thing, which is encoded somehow and it looks like ABDD43DEGO. I contacted 
the people who make the Bluecoat proxies and they claim it's not encrypted and is decodable, but 
would not tell me how (just sent a 100 page manual that also didn't tell me about the encoding).

There are proxies that don't spill the IP but they are much harder to find and a whole lot slower.
Comment 18 anaconda 2007-01-03 05:40:51 UTC
Good work, man. I tried it out; two things: please check the timestamp, it's always the same for me (all log entries start with "<li>05:01, 3 January 2007", when I used your patched version for the first time). Also, localize the "Go" button (you 
can use MediaWiki:Go for that).
Comment 19 anaconda 2007-01-03 06:30:37 UTC
(In reply to comment #18)
> Good work, man. I tried it out; two things: please check the timestamp, it's always the same for me (all log entries start with "<li>05:01, 3 January 2007", when I used your patched version for the first time). Also, localize the "Go" button (you 
> can use MediaWiki:Go for that).

I used it for the first at 04.59 :-). But the bug in this line: $date=date("H:m, j F Y",$timestamp); that should be $date=date("H:i, j F Y",$timestamp);
Comment 20 Aaron Schulz 2007-01-03 12:45:26 UTC
Created attachment 3008 [details]
Summary patch - fix date bug, make radio buttons larger
Comment 21 Invalid Account 2007-01-04 11:17:00 UTC
Okay here's some proxy headers:

X-Forwarded-For: 123.123.123.123
Client-ip: 123.123.123.123
Via: 1.0 cache4.jed
X-BlueCoat-Via: 233643FA53757673

Comment 22 Invalid Account 2007-01-08 17:33:54 UTC
Sometimes proxies also have

X-Forwarded-Host: 
X-Forwarded-Server:
Comment 23 Aaron Schulz 2007-01-11 01:03:14 UTC
Created attachment 3044 [details]
Summary patch - update

-Secure form some more
-Use XML class stuff to compile some of the form
-Use "bool" to make SQL column type more clear
-Add a class to radio buttons rather than use style, they can be enlarged
locally
Comment 24 Aaron Schulz 2007-01-20 07:18:23 UTC
Created attachment 3099 [details]
Alternate patch - seperate checkuser table

This patch adds:
-A streamlined recent changes table for checkuser with its own cut off date. It
also stores the IP as an integer, xff, and user agent data.
-An rc_archived column that is used for exclusion in watchlists/RC ect. Entries
from new edits that where deleted/restored can actually come back now as
article.php and undelete.php just use this flag rather than deleting entries.
-And rc_deleted column for revisiondelete, changelist.php will need some
rewriting later to use it. Revisiondelete needs rc_deleted for proper hiding of
data.
-Improved UI and handling of bad input

Todo maybe:
-All page links from checkuser results are blue linked, even for deleted pages.
Either two delete/restore hooks need to be added or a parameter for
changeslists that allows use of either LinkObj or KnownLinkObj depending on
some argument if this is to be done.
Comment 25 Aaron Schulz 2007-01-20 07:24:39 UTC
Created attachment 3100 [details]
Separate table

Removed some unneeded columns.
Comment 26 Aaron Schulz 2007-01-21 02:42:44 UTC
I'll need to add "0 as rc_patrolled" to stop all those damn red ! marks from
showing on sites with patrolling.
Comment 27 Aaron Schulz 2007-01-21 21:43:54 UTC
Created attachment 3111 [details]
Separate table patch

-Remove last use of wfMsg()
-Checkuser uses its own recentchange line parser, which allows for IP data to
show and deleted pages to be redlinked.
Comment 28 Aaron Schulz 2007-01-22 00:31:59 UTC
Created attachment 3112 [details]
Separate table patch

Add date headers
Comment 29 Aaron Schulz 2007-01-22 01:08:52 UTC
Created attachment 3113 [details]
Separate table patch

Fix tiny newpageletter bug.
Comment 30 Aaron Schulz 2007-01-22 02:01:48 UTC
Created attachment 3114 [details]
Separate table patch

Add cuc_user index
Comment 31 Aaron Schulz 2007-01-22 17:16:50 UTC
Created attachment 3118 [details]
Separate table patch

Initialize $s.
Comment 32 Aaron Schulz 2007-01-27 21:07:16 UTC
Created attachment 3149 [details]
Separate table summary patch

-Improve indexes
-Padd form a bit
-Add some xff searching
Comment 33 Aaron Schulz 2007-01-29 01:21:53 UTC
Created attachment 3153 [details]
Separate table summary patch

Made UI more clear, cleaned up some things.
Comment 34 Aaron Schulz 2007-02-01 23:01:44 UTC
Created attachment 3167 [details]
Separate table summary patch

Fix some things per brion. Clean up some tiny form issues.
Comment 35 Aaron Schulz 2007-02-04 05:29:37 UTC
Created attachment 3178 [details]
Separate table summary patch

Fix exeption handling with a possible null var.
Comment 36 Aaron Schulz 2007-02-06 19:55:04 UTC
Created attachment 3193 [details]
Separate table summary patch

-Remove rc_archived, not needed anymore.
-Removed rc_deleted stuff, that can go in some other patch elsewhere
Comment 37 Brion Vibber 2007-02-14 01:12:49 UTC
Created attachment 3217 [details]
For convenience, diff against current trunk (ProxyTools changes already applied, and one line change elsewhere)
Comment 38 Brion Vibber 2007-02-14 01:29:35 UTC
Created attachment 3218 [details]
Couple tweaks for notices and whitespace

Would recommend making the log link more consistently visible.
Possibly hide the IP list when doing user lookups on a single IP rather than a
range.

Otherwise looking pretty nice; the UI's much more polished than before. While I
don't like duplicating a lot of fields, it does let the aging policy be
separate for RC and CU data so that's probably necessary.
Comment 39 Aaron Schulz 2007-02-14 01:44:22 UTC
Created attachment 3219 [details]
Have log always show
Comment 40 Aaron Schulz 2007-02-14 18:20:50 UTC
Created attachment 3222 [details]
Re-add some messages that were lost
Comment 41 Aaron Schulz 2007-03-12 17:03:53 UTC
Created attachment 3342 [details]
Update, use IPv6 functions
Comment 42 Aaron Schulz 2007-03-13 04:57:02 UTC
Created attachment 3344 [details]
Use hex instead
Comment 43 Aaron Schulz 2007-04-05 20:51:34 UTC
Done in r21016

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links