Bug 409157 - Eat Multiple Burst Notifications
Summary: Eat Multiple Burst Notifications
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-25 03:34 UTC by vindicator
Modified: 2019-06-27 10:08 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.16.3


Attachments
Multiple Burst Notifications (99.53 KB, image/jpeg)
2019-06-25 03:34 UTC, vindicator
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vindicator 2019-06-25 03:34:22 UTC
Created attachment 121121 [details]
Multiple Burst Notifications

SUMMARY
It's only something that "could" be abused...

STEPS TO REPRODUCE
1. Open Google Chrome
2. Add "Canvas Blocker" Extension (https://chrome.google.com/webstore/detail/canvas-blocker-fingerprin/nomnklagbgmgghhjidfhnoelnjfndfpd)
3. View https://devblogs.microsoft.com/dotnet/announcing-net-core-3-0-preview-6/

OBSERVED RESULT
There is a burst of 5+ duplicate notifications.

EXPECTED RESULT
When there are duplicate notifications (within a certain timeframe? from the same source?), only 1 notification is captured and displayed.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.16.1
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4

ADDITIONAL INFORMATION
I guess it's really just a feature request. Otherwise, it's doing just what it's supposed to do.

I'm sure it's just their blog in particular that is excessively sniffing out using the canvas.

Other sites that sniff are only have 1 notification that gets displayed.

I also know I can disable notifications within the chrome extension.
Comment 1 Kai Uwe Broulik 2019-06-25 10:14:54 UTC
I originally had it that it would combine multiple identical notifications but that can cause issues elsewhere. For example deleting two plasmoids of the same type in plasmashell will then only result in one notification.
Comment 2 Kai Uwe Broulik 2019-06-25 10:15:39 UTC
Maybe if they're done in quick succession (like within 1 second) we could refuse the notification request.
Comment 3 Nate Graham 2019-06-25 10:44:19 UTC
That could make sense when the content is identical, yeah.

BTW there are other canvas fingerprinting blocker extensions that don't send spammy notifications.
Comment 4 Kai Uwe Broulik 2019-06-25 10:46:22 UTC
Try https://phabricator.kde.org/D22088
Comment 5 Kai Uwe Broulik 2019-06-27 10:08:36 UTC
Git commit 0ed653ba75d63de6e39125a3be00b72e5b32bab0 by Kai Uwe Broulik.
Committed on 27/06/2019 at 10:06.
Pushed by broulik into branch 'Plasma/5.16'.

[Notifications] Ignore excess spam

When multiple identical notifications are sent in quick succession, discard the request and let it fail.
Previously it would always replace the last notification if identical, now it discards the request and only does so if it happened
within 1 second of the last notification to avoid discarding genuine identical notifications like when deleting two plasmoids of
the same type.
FIXED-IN: 5.16.3

Differential Revision: https://phabricator.kde.org/D22088

M  +18   -0    libnotificationmanager/server_p.cpp
M  +4    -2    libnotificationmanager/server_p.h

https://commits.kde.org/plasma-workspace/0ed653ba75d63de6e39125a3be00b72e5b32bab0