A cookie is a piece of data stored by a website in your web browser and made available to that site when you use the site. (see [[HTTP cookie]] for more info)
For a while people have thought it would be useful to use cookies as part of our blocking system. The idea is that when a user is blocked, mediawiki would give them a cookie to indicate that they are blocked. This would then inhibit them from editing even if they changed IPs. The primary limitation to this approach is that any terminologically savvy user could easily remove the cookie.
There is a request filed for this feature (http://bugzilla.wikimedia.org/show_bug.cgi?id=3233) along with a patch, but this patch has not yet been merged into mediawiki.
Because interest for this feature keeps reoccurring, I threw together a quick hack using javascript. This method of implementation allows us to experiment and gauge the value of the approach without distracting the core developers with more code to merge and support.
This could be implemented by any admin on an of our wiks. http://commons.wikimedia.org/w/index.php?title=MediaWiki:Monobook.js&dif...
Like all cookie based solutions, it is easy to bypass. Its primary disadvantage compared to the mediawiki patch is that it is not integrated with the block page, to activate a cookie based block you must make a separate edit to the target user's javascript.
The current behavior blocks all uploads and edits by the impacted browser, but it would be fairly trivial to make the function more like regular blocking... or even more fine grained with per-namespace or per article blocks. The current behavior also renews the block for 24 hours every time the user *views* a page while logged in as the blocked user. This too could be trivially changed.
If anyone tries this out or improves it, please let me know. I pretty much learned javascript in order to do this.. and it only took about 15 minutes to do, so don't expect it to work miracles but it should work as advertised.
On 12/12/06, Gregory Maxwell gmaxwell@gmail.com wrote: <snip info about cookie-based blocking>
The current behavior blocks all uploads and edits by the impacted browser, but it would be fairly trivial to make the function more like regular blocking... or even more fine grained with per-namespace or per article blocks. The current behavior also renews the block for 24 hours every time the user *views* a page while logged in as the blocked user. This too could be trivially changed.
This is interesting.
A comment in the code says "If the user logs on while this is in their js, their browser gets a 24hour cookie block." which seems rather different to "The current behavior also renews the block for 24 hours every time the user *views* a page while logged in as the blocked user." The latter comment I don't entirely understand. Is it that the block is only activated once they log in? If so, I think that could be a very useful feature for Commons, where users don't always regularly log in. Short blocks are good to get a user's attention (generally re: uploading copyivos), but if they don't even try to log in while they're blocked then they go basically unnoticed.
If this could be changed to create permanent (or timed) uploading-only blocks, Commons would start using this straight away, I feel certain. :) ( http://bugzilla.wikimedia.org/show_bug.cgi?id=4995 )
BTW: I think something like this would be good in its own MediaWiki page, it is easier to track changes to it and refer to it instead of jumbled in Monobook.js.
cheers, Brianna user:pfctdayelise
On 12/11/06, Brianna Laugher brianna.laugher@gmail.com wrote:
This is interesting.
A comment in the code says "If the user logs on while this is in their js, their browser gets a 24hour cookie block." which seems rather different to "The current behavior also renews the block for 24 hours every time the user *views* a page while logged in as the blocked user." The latter comment I don't entirely understand. Is it that the block is only activated once they log in? If so, I think that could be a very useful feature for Commons, where users don't always regularly log in. Short blocks are good to get a user's attention (generally re: uploading copyivos), but if they don't even try to log in while they're blocked then they go basically unnoticed.
If they view a page while logged and while the block is still in their monobook.js, the block is extended. Unfortunately if they leave before they are blocked and never log back in, we can't currently do anything about them.
However, a simmlar approach could be used for that application. If every time a user uses commons while logged in we could set a cookie "lastcommonsuser=username". Then a sitewide js could be implimented which pops up message to users who have been naughty.
If this could be changed to create permanent (or timed) uploading-only blocks, Commons would start using this straight away, I feel certain. :) ( http://bugzilla.wikimedia.org/show_bug.cgi?id=4995 )
Commenting out one line of the code would turn it into an upload only block.
Alternatively with a few more lines of code we could make the sort of cookie block selectable by the blocking admin.
BTW: I think something like this would be good in its own MediaWiki page, it is easier to track changes to it and refer to it instead of jumbled in Monobook.js.
Anyone is welcome to move it... I'm working on another project at the moment, if no one has touched it when I'm done, I'll come back and brush it up some.
Thanks for your interest.
On 12/11/06, Brianna Laugher brianna.laugher@gmail.com wrote: [snip]
If this could be changed to create permanent (or timed) uploading-only blocks, Commons would start using this straight away, I feel certain.
I've added support for an upload only block.
http://commons.wikimedia.org/w/index.php?title=MediaWiki:Monobook.js&cur...
If you test it out, you might have to shift-reload to get the new-site wide js file before this works for you. The changes to your personal monobook.js take effect quickly, but the site wide seems to be more aggressively cached.
Please now see http://commons.wikimedia.org/wiki/MediaWiki:Cookieblock.js .
regards, Brianna