Project

General

Profile

Bug #7989

Jessie: raw HTML is displayed in desktop notifications

Added by intrigeri over 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
Start date:
10/02/2014
Due date:
10/15/2015
% Done:

100%

QA Check:
Feature Branch:
Type of work:
Code

Description

This is when running GNOME Shell.


Related issues

Related to Tails - Bug #8897: The link to persistence documentation in tails-persistence-setup doesn't trigger any user-visible action Resolved 02/12/2015
Related to Tails - Bug #10559: MAC spoofing failure notification should point to the corresponding documentation Confirmed 01/23/2019
Duplicated by Tails - Bug #8362: Unparsed markup in virtual machine notification Duplicate 12/02/2014
Blocks Tails - Bug #8040: Update notification screenshots in the documentation for Jessie Duplicate 10/09/2014

Associated revisions

Revision 74eb6817 (diff)
Added by intrigeri about 4 years ago

Make Desktop::Notify support notification actions.

I've submitted this patch upstream:
https://rt.cpan.org/Ticket/Display.html?id=102643

Upstream seems to be inactive since 2009, but the entire library has 104 SLOC
(including my additions, excluding the test suite) that I understand easily, so
worst case I'll take it over there, or we'll carry the patch in Debian or
in Tails.

Will-fix: #7989 (just a first step)

Revision 9c3c7ee3 (diff)
Added by intrigeri about 4 years ago

Adapt tails-virt-notify-user to use a notification action instead of a hyperlink.

Will-fix: #7989 (yet another step)

Revision 215c754b (diff)
Added by intrigeri about 4 years ago

Adapt tails-security-check to use a notification action instead of a hyperlink.

Will-fix: #7989 (yet another step)

Revision 0afc9fd4 (diff)
Added by intrigeri about 4 years ago

Port tails-warn-about-disabled-persistence to notification actions.

Will-fix: #7989 (yet another part thereof)

Revision 0fb456e0 (diff)
Added by intrigeri over 3 years ago

tails-security-check: use a dialog box instead of desktop notifications.

It's important enough to be worth being noisy about, and providing
clickable links (which we can't easily do with desktop notifications
these days).

Refs: #7989

Revision ee67ef32 (diff)
Added by intrigeri over 3 years ago

MAC spoofing failure notification: remove the link to the documentation.

It was broken on Tails/Wheezy already (the link to the doc is not
visible, and one of the two possible links was broken anyway), so this
is not a regression brought by porting to Jessie. And on Jessie, due to
bug #7989 these links would not work as-is anyway. It's unclear how this
would be best solved; #10559 has been created to sum up the problem and
track future improvements.

Refs: #7989, #10559

History

#1 Updated by intrigeri over 4 years ago

This is missing functionality in GNOME Shell's notification display code: https://bugzilla.gnome.org/show_bug.cgi?id=653033

#2 Updated by intrigeri over 4 years ago

  • Subject changed from HTML in "running in a VM" notification is not interpreted to Raw HTML is displayed in desktop notifications

#3 Updated by intrigeri over 4 years ago

Presumably, we could replace URLs with notification actions.

Examples (look for add_action):

However, neither notify-send nor the Perl Desktop::Notify library support it, so the instances where we display notifications from scripts written in these languages should be adapted, e.g. one of:

  • be converted to use the notification API with GObject Introspection
  • be rewritten in Python

Or, we can add support for actions in Desktop::Notify.

Note that one cannot use dbus-send, since org.freedesktop.Notifications.Notify wants arguments of types (susssasa{sv}i), while dbus-send can only send (susssasa{ss}i).

#4 Updated by intrigeri over 4 years ago

  • Duplicated by Bug #8362: Unparsed markup in virtual machine notification added

#5 Updated by intrigeri over 4 years ago

  • Assignee set to intrigeri
  • Priority changed from Normal to Elevated

#6 Updated by intrigeri about 4 years ago

Update: see the blueprint for the up-to-date status of affected scripts (those with links).

Here's a survey of the potentially affected code on current feature/jessie branch. Anything that doesn't need to be modified is stroke-through.

Perl scripts using Desktop::Notify:

  • config/chroot_local-includes/usr/local/bin/tails-htp-notify-user: no link
  • DONE config/chroot_local-includes/usr/local/bin/tails-security-check
  • DONE config/chroot_local-includes/usr/local/bin/tails-virt-notify-user
  • removed config/chroot_local-includes/usr/local/bin/tails-warn-about-disabled-persistence

Shell scripts using notify-send via config/chroot_local-includes/usr/local/sbin/tails-notify-user:

  • config/chroot_local-includes/etc/NetworkManager/dispatcher.d/20-time.sh: no link
  • config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready-notification.sh: no link
  • config/chroot_local-includes/usr/local/sbin/i2p-browser: no link
  • config/chroot_local-includes/usr/local/sbin/tails-i2p: no link (well, there are some URLs but they're not formatted as links)
  • config/chroot_local-includes/usr/local/sbin/tails-spoof-mac
  • config/chroot_local-includes/usr/local/sbin/unsafe-browser: no link

Perl scripts using notify-send via config/chroot_local-includes/usr/local/sbin/tails-notify-user:

  • config/chroot_local-includes/usr/local/sbin/tails-restricted-network-detector

Python scripts using notify-send via config/chroot_local-includes/usr/local/sbin/tails-notify-user:

  • config/chroot_local-includes/usr/local/sbin/tails-additional-software: no link

#7 Updated by intrigeri about 4 years ago

  • Status changed from Confirmed to In Progress

#8 Updated by intrigeri about 4 years ago

  • % Done changed from 0 to 10

intrigeri wrote:

Or, we can add support for actions in Desktop::Notify.

Done, patch submitted upstream. Took me one hour, much faster than rewriting all this code into Python / testing / dealing with regressions.

#12 Updated by intrigeri about 4 years ago

  • % Done changed from 10 to 20

#13 Updated by intrigeri about 4 years ago

Anyone wanting to take over or do their bit, please read the message for a257e520382d96de9a00a2905794b3dd2cf93c84, that contains important implementation information.

#15 Updated by intrigeri about 4 years ago

  • Related to Bug #8897: The link to persistence documentation in tails-persistence-setup doesn't trigger any user-visible action added

#16 Updated by intrigeri about 4 years ago

That's related to #8897, that could also benefit from a session-wide service that can be triggered to opens URLs.

#17 Updated by intrigeri almost 4 years ago

Note that one cannot use dbus-send, since org.freedesktop.Notifications.Notify wants arguments of types (susssasa{sv}i), while dbus-send can only send (susssasa{ss}i).

Actually, busctl (shipped with systemd) might be able to do that.

#18 Updated by intrigeri over 3 years ago

  • Subject changed from Raw HTML is displayed in desktop notifications to Jessie: raw HTML is displayed in desktop notifications
  • Due date set to 10/15/2015
  • Target version changed from Tails_2.0 to Tails_1.6

#20 Updated by intrigeri over 3 years ago

I'm told that the new GNotifications allow one to restart the process that has sent the notification in the first place, so that it can handle the action: this avoids having to leave it running forever in case the user clicks the action button.

#21 Updated by intrigeri over 3 years ago

  • Blueprint set to https://tails.boum.org/blueprint/GNotification/

I had a look to GNotification, will push my findings to a new blueprint.

#22 Updated by intrigeri over 3 years ago

  • Priority changed from Elevated to High
  • Target version changed from Tails_1.6 to Tails_1.7

#23 Updated by sajolida over 3 years ago

Note that this is due on October 15 which is actually before Tails 1.7.

#24 Updated by intrigeri over 3 years ago

Little chance I complete this by October 15, and even the end of the month is unlikely. Worst case it will be top-priority for my first Jessie sprint (starting on November 9). Note that a lot of this work has been done months ago already, so it's not as if we were that bad.

#25 Updated by intrigeri over 3 years ago

  • Target version changed from Tails_1.7 to Tails_1.8

This will be one of my top priorities during the Tails/Jessie sprints I'll have in November.

#26 Updated by intrigeri over 3 years ago

  • Blocks Bug #8040: Update notification screenshots in the documentation for Jessie added

#27 Updated by intrigeri over 3 years ago

  • Related to Bug #10559: MAC spoofing failure notification should point to the corresponding documentation added

#28 Updated by intrigeri over 3 years ago

  • Blueprint changed from https://tails.boum.org/blueprint/GNotification/ to https://tails.boum.org/blueprint/desktop_notifications/

#29 Updated by intrigeri over 3 years ago

  • Status changed from In Progress to Resolved
  • Assignee deleted (intrigeri)
  • % Done changed from 20 to 100

Also available in: Atom PDF