A security release, from a review of what a notification, or whoever sends it, can make Supernotify do. See Security.
🚨 Breaking changes
- Actions:
enquire_configuration,enquire_archive,enquire_last_notification,purge_archive,purge_media,clear_snoozesandreset_overridesare now for administrators only. Automations and scripts can still call them, and the Reset overrides button is unchanged. A dashboard that calls one of them for a user who isn't an administrator will no longer get a response - Email: a direct SMTP email only attaches files from the media path, or from a folder Home Assistant allows, in
allowlist_external_dirsormedia_dirs, as Home Assistant's own SMTP integration requires. Anything else given inimagesorsnapshot_image_pathis left out with a warning, where before any file Home Assistant could read was sent - Email:
footeronly replaces{e.delivery_name},{e.notification_id},{e.id},{e.priority},{e.title}and{e.message}. It was formatted against the whole envelope, which could be used to read the SMTP password - Email: the default HTML template escapes the message, title and links, so HTML in a
messageis shown as text. Usemessage_htmlfor HTML - Media: a
snapshot_urlis only kept if it is an image, and no bigger than the new Largest Snapshot Download setting, 20MB unless changed - Media: the media path can't be the Home Assistant config folder, a folder that holds it, or within
.storage, since everything in it is served from the media URL and removed when old. One that is gets a repair, and media is switched off until it is changed - Archive:
enquire_archiveneeds the wholeidof a notification, where part of one used to match
✨ Enhancements
- Templates: a new Render Templates in Notify Calls setting decides whether templates in the message and data of a notify call are rendered, as well as those in the configuration. An automation has already rendered its own templates before Supernotify sees them, so anything left looking like a template came from somewhere else, such as the text of an incoming message. It is off for new installs and stays on for existing ones, see Automation and Templates
- Media: a new Only Local Snapshot URLs setting, on for new installs and off for existing ones until switched on, limits a
snapshot_urlto Home Assistant itself or a subdomain of its address, a device on the same network, or a URL inallowlist_external_urls, and follows no redirects, see Snapshot URLs - Media:
snapshot_urlcan be a list of URLs, tried in turn until one gives an image, each with its ownreprocessif needed, e.g.neverfor an animated GIF and the default for a JPEG to fall back on. A delivery that passes the URL on to the phone, such as Mobile Push, gets the first URL, or the one that worked if the image has already been fetched for another delivery. A single URL works as before. If no URL gives an image, the camera incamera_entity_idis snapped instead, where before it was ignored whenever there was asnapshot_url. A newhelp_urlraises a repair when none of the URLs gives an image, listing why each one failed and linking tohelp_url, such as the page where the URLs are set up. It's removed once a URL works again (#331), see Snapshot URLs - Archive: passwords, tokens and API keys in the data of a notification are left out of the archive files, events and MQTT messages, and out of
enquire_configurationandenquire_last_notification
🐛 Bug fixes
- Media:
reprocessis accepted undermediain a notify call or a scenario, where it was rejected as an unknown key, so could only be set in theoptionsof a delivery or transport. The documentation showed it undermedia: options:, which has never been read, and now showsmedia: reprocess:(#331)
📝 Other changes
- Dependencies:
beautifulsoup4is required by its own name rather than asbs4, and it andaiofileshave a minimum version, that of the oldest supported Home Assistant, so they follow the versions Home Assistant ships - Development: every GitHub workflow action is pinned to a commit, and the tests of a pull request run with a read-only token, badges and documentation being published by a separate job
- Documentation: a security policy, and advice on protecting the SMTP password and on who can snooze
What's Changed
Full Changelog: v2.18.2...v2.19.0-beta4