Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F71138598
01-T413139.patch
STran (STran)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
STran
Dec 19 2025, 8:03 AM
2025-12-19 08:03:01 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
01-T413139.patch
View Options
From 387f936c134ded47bdeb72aab46d8bbc4ce272ad Mon Sep 17 00:00:00 2001
From: STran <stran@wikimedia.org>
Date: Fri, 19 Dec 2025 00:01:01 -0800
Subject: [PATCH] SECURTIY: Only show temp accounts on IP if temp accounts are
known
Why:
The function will fail fatally otherwise as it cannot count an unknown thing
What:
- Check `isKnown` before proceeding with shouldShowCountFromThisIP
Bug: T413139
Change-Id: I0cc87247ad08f7aebfde40924fffc49aeb902afc
---
.../SpecialContributionsBeforeMainOutputHandler.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/HookHandler/SpecialContributionsBeforeMainOutputHandler.php b/src/HookHandler/SpecialContributionsBeforeMainOutputHandler.php
index 8da632f7..203eaed6 100644
--- a/src/HookHandler/SpecialContributionsBeforeMainOutputHandler.php
+++ b/src/HookHandler/SpecialContributionsBeforeMainOutputHandler.php
@@ -56,7 +56,11 @@ class SpecialContributionsBeforeMainOutputHandler implements SpecialContribution
}
private function shouldShowCountFromThisIP( UserIdentity $user, ContributionsSpecialPage $sp ): bool {
- if ( $user->isRegistered() || !$this->isValidIPOrQueryableRange( $user->getName(), $sp->getConfig() ) ) {
+ if (
+ !$this->tempUserConfig->isKnown() ||
+ $user->isRegistered() ||
+ !$this->isValidIPOrQueryableRange( $user->getName(), $sp->getConfig() )
+ ) {
return false;
}
--
2.48.1
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
22759117
Default Alt Text
01-T413139.patch (1 KB)
Attached To
Mode
T413139: [Ruwiki] Error message displayed while accessing Special:Contributions for an IP using an account with CU rights
Attached
Detach File
Event Timeline
Log In to Comment