Matmarex has uploaded a new change for review.
https://gerrit.wikimedia.org/r/64565
Change subject: Set preference 'watchlisttoken' to type=api
......................................................................
Set preference 'watchlisttoken' to type=api
There is precisely zero reason for anybody to read the value on
Special:Preferences (it's only useful for external usage - thus the
'api' type) nor to set this preference themselves (if empty, it's
autofilled when you visit your watchlist).
Change-Id: I0bdd2469972c4af81bfb480e9dde58cdd14c67a8
---
M includes/Preferences.php
M languages/messages/MessagesEn.php
2 files changed, 1 insertion(+), 12 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/65/64565/1
diff --git a/includes/Preferences.php b/includes/Preferences.php
index 1b01750..2fea827 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -943,15 +943,8 @@
}
if ( $wgEnableAPI ) {
- # Some random gibberish as a proposed default
- // @todo Fixme: this should use CryptRand but we may
not want to read urandom on every view
- $hash = sha1( mt_rand() . microtime( true ) );
-
$defaultPreferences['watchlisttoken'] = array(
- 'type' => 'text',
- 'section' => 'watchlist/advancedwatchlist',
- 'label-message' => 'prefs-watchlist-token',
- 'help' => $context->msg(
'prefs-help-watchlist-token', $hash )->escaped()
+ 'type' => 'api',
);
}
diff --git a/languages/messages/MessagesEn.php
b/languages/messages/MessagesEn.php
index 4752372..ef3f71b 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -1877,7 +1877,6 @@
'prefs-watchlist-days-max' => 'Maximum $1 {{PLURAL:$1|day|days}}',
'prefs-watchlist-edits' => 'Maximum number of changes to show in
expanded watchlist:',
'prefs-watchlist-edits-max' => 'Maximum number: 1000',
-'prefs-watchlist-token' => 'Watchlist token:',
'prefs-misc' => 'Misc',
'prefs-resetpass' => 'Change password',
'prefs-changeemail' => 'Change email address',
@@ -1899,9 +1898,6 @@
'recentchangesdays-max' => 'Maximum $1 {{PLURAL:$1|day|days}}',
'recentchangescount' => 'Number of edits to show by default:',
'prefs-help-recentchangescount' => 'This includes recent changes, page
histories, and logs.',
-'prefs-help-watchlist-token' => "Filling in this field with a secret key
will generate an RSS feed for your watchlist.
-Anyone who knows the key in this field will be able to read your watchlist, so
choose a secure value.
-Here's a randomly-generated value you can use: $1",
'savedprefs' => 'Your preferences have been saved.',
'timezonelegend' => 'Time zone:',
'localtime' => 'Local time:',
--
To view, visit https://gerrit.wikimedia.org/r/64565
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bdd2469972c4af81bfb480e9dde58cdd14c67a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits