Adamw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/53195


Change subject: DO NOT MERGE: anonymous users' ID given session expiry
......................................................................

DO NOT MERGE: anonymous users' ID given session expiry

This will totally break any logging which relies on a user having the same ID 
when they begin a new session.  I'm making the patch public for anyone who 
wants to experiment with this issue.

A potential long-term solution might be to keep an ID for two sessions, then 
clear it before the third session.  This would give us about half the current 
volume of data, and should alleviate the worst of our privacy concerns.

Change-Id: If2f096dadb639769d859e1596d84b3ad5775a01d
---
M resources/mediawiki/mediawiki.user.js
1 file changed, 1 insertion(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/53195/1

diff --git a/resources/mediawiki/mediawiki.user.js 
b/resources/mediawiki/mediawiki.user.js
index 308e4ad..8a41d59 100644
--- a/resources/mediawiki/mediawiki.user.js
+++ b/resources/mediawiki/mediawiki.user.js
@@ -143,10 +143,6 @@
                /**
                 * Gets the current user's name or a random ID automatically 
generated and kept in a cookie.
                 *
-                * This ID is persistent for anonymous users, staying in their 
browser up to 1 year. The
-                * expiration time is reset each time the ID is queried, so in 
most cases this ID will
-                * persist until the browser's cookies are cleared or the user 
doesn't visit for 1 year.
-                *
                 * @return String: User name or random session ID
                 */
                this.id = function() {
@@ -155,16 +151,7 @@
                        if ( name ) {
                                return name;
                        }
-                       id = $.cookie( 'mediaWiki.user.id' );
-                       if ( typeof id === 'undefined' || id === null ) {
-                               id = user.generateRandomSessionId();
-                       }
-                       // Set cookie if not set, or renew it if already set
-                       $.cookie( 'mediaWiki.user.id', id, {
-                               expires: 365,
-                               path: '/'
-                       } );
-                       return id;
+                       return user.sessionId();
                };
 
                /**

-- 
To view, visit https://gerrit.wikimedia.org/r/53195
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2f096dadb639769d859e1596d84b3ad5775a01d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Adamw <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to