snappymail/dev
djmaze 08f34b9954 @ZaphodB fix(security): message images loaded without consent through srcset and CSS
The sanitizer sends img src, and url() in background-image, list-style-image
and content, through the remote content handling: blocked until the user
allows it, rewritten to the proxy when it is on. Two other ways to load an
image were left alone:

- srcset (and sizes) were on the attribute allowlist and never rewritten, so
  <img srcset="https://..."> loaded when the message opened. With the proxy on,
  the CSP keeps img-src to 'self', but a relative srcset="?/ProxyExternal/<b64>"
  is same-origin and made the server fetch an attacker URL at render time: a
  read receipt with no click. With the proxy off the browser fetched directly.
- url() in any other style property (border-image-source, mask-image, filter,
  ...) kept its value, with the same two outcomes.

Drop srcset and sizes from the allowlist (attributes not on it are deleted),
and remove any other style property whose value holds url(). Relative img src
was already safe: anything not cid:, http(s) or data:image/ is parked as
data-x-src-broken.

Checked the style sweep in Chromium: border-image-source, mask-image (both
spellings), filter and cursor lose the url(), other declarations survive, and
the background/list-style shorthands are left to the existing handling.
2026-10-25 23:28:14 +01:00
..
App Add an option to store(and delete) encrypted private key passphrase in the browser across multiple sessions 2024-12-09 11:18:41 -05:00
Common @ZaphodB fix(security): message images loaded without consent through srcset and CSS 2026-10-25 23:28:14 +01:00
Component Everything to ES2020 2024-04-02 22:24:53 +02:00
DAV Everything to ES2020 2024-04-02 22:24:53 +02:00
External Add an option to store(and delete) encrypted private key passphrase in the browser across multiple sessions 2024-12-09 11:18:41 -05:00
Knoin Centralize tryToClose() for all popups 2024-08-06 21:41:52 +02:00
Mime Bugfix: mime parser headerValue() is null 2024-04-02 22:40:12 +02:00
Model Add intermediate certificates for S/MIME signing 2025-01-07 21:32:26 +01:00
Remote Change handling of (token) errors due to #1706 2024-08-16 22:05:15 +02:00
Screen Added "copy to" action in menu's for #1559 2024-04-28 17:32:25 +02:00
Settings Improved font-size handling to prevent issue #1082 2026-10-20 16:25:00 +02:00
Sieve Prepare for #1793 2024-10-08 17:49:21 +02:00
Storage Add an option to store(and delete) encrypted private key passphrase in the browser across multiple sessions 2024-12-09 11:18:41 -05:00
Stores Merge pull request #1863 from SergeyMosin/pgp-improvements 2026-10-22 13:39:45 +02:00
Styles Make Languages modal 10px wider 2026-10-20 23:33:40 +02:00
View Merge pull request #1879 from tribut/smime-intermediate-certs 2026-10-22 13:41:20 +02:00
admin.js Cleanup AppUser and AdminApp 2022-03-31 17:39:53 +02:00
app.js Cleanup AppUser and AdminApp 2022-03-31 17:39:53 +02:00
boot.js Change handling of (token) errors due to #1706 2024-08-16 22:05:15 +02:00
bootstrap.js Moved rl.fetch and rl.fetchJSON to boot.js so that AppData can be fetched as JSON 2023-02-21 09:04:47 +01:00
dragdropgecko.js Everything to ES2020 2024-04-02 22:24:53 +02:00
prototype.js Bugfix: MIME parser RegExp didn't escape boundary which caused issues 2024-02-26 17:36:55 +01:00
serviceworker.js Changes for https://github.com/the-djmaze/snappymail/issues/37 2020-11-09 20:14:04 +01:00
shortcuts.js Log current shortcuts scope for #690 2022-11-21 13:20:59 +01:00
sieve.js Change handling of (token) errors due to #1706 2024-08-16 22:05:15 +02:00