mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +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();
|
||||
$count++;
|
||||
// This is an unbounded list, put a cap on the allowable mentioned user list
|
||||
if ( $count > 100 ) {
|
||||
break;
|
||||
// If more than 20 users are being pinged this is likely a spam/attack vector
|
||||
// Don't send any mention notifications.
|
||||
if ( $count > 20 ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue