mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 15:24:52 +09:00
Limit the number of subscription filters per subscriber
A subscriber could keep sending subscribe requests with new filters and the controller would add every one of them to the subscriber's filter set without bound, growing memory until it ran out. Add controller.max_subscription_filters (default 10000) and reject subscribe and replace requests that would leave a subscriber holding more filters than that for one event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ce6bfe282f
commit
690b79d2b7
5 files changed
+95
-5
No files matched your search
@@ -83,7 +83,7 @@ export default class Controller {
|
||||
private _events = new events.EventEmitter<ControllerEvents>();
|
||||
|
||||
/** Event subscription controller */
|
||||
subscriptions = new lib.SubscriptionController();
|
||||
subscriptions = new lib.SubscriptionController(() => this.config.get("controller.max_subscription_filters"));
|
||||
/** User manager for the cluster, also contains access to the user records */
|
||||
users: UserManager;
|
||||
/** Instance manager for the cluster, also contains access to the user records */
|
||||
|
||||
Reference in new issue
Block a user