jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/356320 )
Change subject: Fix user talk exception for blacklist
......................................................................
Fix user talk exception for blacklist
There was a null-dereference for events without titles.
Also, it should only whitelist their own user talk space, not e.g.
mentions on someone else's user talk space.
Bug: T150419
Bug: T166627
Change-Id: If7d9cad4eb33ce1f1e6b7d86244332ad5dece954
---
M includes/controller/NotificationController.php
1 file changed, 13 insertions(+), 1 deletion(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/controller/NotificationController.php
b/includes/controller/NotificationController.php
index 66ced23..1706bcb 100644
--- a/includes/controller/NotificationController.php
+++ b/includes/controller/NotificationController.php
@@ -433,7 +433,19 @@
// Apply blacklists and whitelists.
$notify->addFilter( function ( $user ) use ( $event ) {
- if ( self::isBlacklistedByUser( $event, $user ) &&
$event->getTitle()->getNamespace() !== NS_USER_TALK ) {
+ $title = $event->getTitle();
+
+ if ( self::isBlacklistedByUser( $event, $user ) &&
+ (
+ $title === null ||
+ !(
+ // Still notify for posts
anywhere in
+ // user's talk space
+ $title->getRootText() ===
$user->getName() &&
+ $title->getNamespace() ===
NS_USER_TALK
+ )
+ )
+ ) {
return self::isWhitelistedByUser( $event, $user
);
}
--
To view, visit https://gerrit.wikimedia.org/r/356320
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If7d9cad4eb33ce1f1e6b7d86244332ad5dece954
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Mooeypoo <[email protected]>
Gerrit-Reviewer: MtDu <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits