jenkins-bot has submitted this change and it was merged.
Change subject: BannerHistoryLogger: Increase random shift of timestamps
......................................................................
BannerHistoryLogger: Increase random shift of timestamps
Change-Id: I26ae1ee3eed2d12ffd2f6728d80295175d63e303
---
M resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
1 file changed, 9 insertions(+), 3 deletions(-)
Approvals:
Ejegg: Looks good to me, but someone else must approve
Awight: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
index 44396a3..b020038 100644
--- a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
+++ b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
@@ -14,7 +14,10 @@
readyToLogPromise,
BANNER_HISTORY_KV_STORE_KEY = 'banner_history',
- EVENT_LOGGING_SCHEMA = 'CentralNoticeBannerHistory';
+ EVENT_LOGGING_SCHEMA = 'CentralNoticeBannerHistory',
+
+ // The maximum random shift applied to timestamps, for user
privacy
+ TIMPESTAMP_RANDOM_SHIFT_MAX = 60;
/**
* Load the banner history log from KV storage
@@ -42,7 +45,10 @@
// Randomly shift timestamp +/- 0 to 10 seconds, so
logs can't be
// linked to specific Web requests. This is to
strengthen user
// privacy.
- randomTimeShift = Math.round( Math.random() * 20 ) - 10,
+ randomTimeShift =
+ Math.round( Math.random() *
TIMPESTAMP_RANDOM_SHIFT_MAX ) -
+ ( TIMPESTAMP_RANDOM_SHIFT_MAX / 2 ),
+
time = now + randomTimeShift,
logEntry = {
@@ -300,4 +306,4 @@
}
};
-} )( jQuery, mediaWiki );
\ No newline at end of file
+} )( jQuery, mediaWiki );
--
To view, visit https://gerrit.wikimedia.org/r/233065
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I26ae1ee3eed2d12ffd2f6728d80295175d63e303
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: campaign_mixins
Gerrit-Owner: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits