Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a notification rate limiter. #187

Open
1 task done
tseli0s opened this issue Apr 13, 2023 · 1 comment
Open
1 task done

Add a notification rate limiter. #187

tseli0s opened this issue Apr 13, 2023 · 1 comment

Comments

@tseli0s
Copy link

tseli0s commented Apr 13, 2023

Prerequisites

  • I have searched open and closed issues for duplicates.

Feature

Is your feature request related to a problem? Please describe.
Technically, yes. The problem is that a malicious application can crash the entire system by spamming notifications. Just had this with a Wine program happen.

Describe the solution you'd like
A rate limiter can do the job. The server will refuse to handle any new notifications from a process for some time, if that process already sent over for example 20 notifications within a minute. Every minute that counter resets and the process can start sending notifications again.

The only problem is how would a developer would handle such an error. Afaik libnotify at least would have to be modified, I don't know if DBus would too.

Existing work
Maybe, but I don't know.

Describe alternatives you've considered
None apart from just letting someone's OS to crash.

Additional context
-

@janxkoci
Copy link

janxkoci commented Aug 1, 2023

Interesting - I recall @jeremypw once generated 2000 notifications to test a bug and he didn't mention any crash.

Also, you said crash - do you have a backtrace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants