AndyRussG has uploaded a new change for review. https://gerrit.wikimedia.org/r/233065
Change subject: BannerHisotryLogger: Increase random shift of timestamps ...................................................................... BannerHisotryLogger: Increase random shift of timestamps Change-Id: I26ae1ee3eed2d12ffd2f6728d80295175d63e303 --- M resources/subscribing/ext.centralNotice.bannerHistoryLogger.js 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/65/233065/1 diff --git a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js index dd2893f..9e706bd 100644 --- a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js +++ b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js @@ -13,7 +13,10 @@ log, 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 @@ -41,7 +44,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 = { -- To view, visit https://gerrit.wikimedia.org/r/233065 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26ae1ee3eed2d12ffd2f6728d80295175d63e303 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: campaign_mixins Gerrit-Owner: AndyRussG <andrew.green...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits