mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 16:04:35 +00:00
Limit Echo mentions to 20 users
Bug: 50082 Change-Id: I7eb0f41fc9b0e3a396383a1adaecf51dc883217f
This commit is contained in:
parent
f4ef97cb06
commit
44ec374632
|
@ -174,9 +174,10 @@ abstract class EchoDiscussionParser {
|
||||||
}
|
}
|
||||||
$mentionedUsers[$user->getId()] = $user->getId();
|
$mentionedUsers[$user->getId()] = $user->getId();
|
||||||
$count++;
|
$count++;
|
||||||
// This is an unbounded list, put a cap on the allowable mentioned user list
|
// If more than 20 users are being pinged this is likely a spam/attack vector
|
||||||
if ( $count > 100 ) {
|
// Don't send any mention notifications.
|
||||||
break;
|
if ( $count > 20 ) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue