Skip to content

fix: hex-encode Windows notification icon temp filenames#50484

Merged
jkleinsc merged 2 commits into40-x-yfrom
trop/40-x-y-bp-fix-hex-encode-windows-notification-icon-temp-filenames-1774456208329
Mar 26, 2026
Merged

fix: hex-encode Windows notification icon temp filenames#50484
jkleinsc merged 2 commits into40-x-yfrom
trop/40-x-y-bp-fix-hex-encode-windows-notification-icon-temp-filenames-1774456208329

Conversation

@trop
Copy link
Copy Markdown
Contributor

@trop trop bot commented Mar 25, 2026

Backport of #50454

See that PR for details.

Notes: Fixed a bug where Windows notification icons could fail to save because their temporary filenames contained invalid characters.

trop bot and others added 2 commits March 25, 2026 16:30
NotificationPresenterWin was using SHA1HashString(origin.spec()) directly
as the basename for the temporary PNG written for toast icons.

SHA1HashString returns raw digest bytes, so the generated filename could
contain invalid path characters on Windows. That caused WriteFile to fail
when saving notification icons, which left toast XML without the expected
icon path.

Hex-encode the digest before appending .png so the temporary filename is
filesystem-safe while keeping deterministic naming for a given origin.

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Robo <hop2deep@gmail.com>

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
@trop trop bot requested review from a team and codebytere March 25, 2026 16:30
@trop trop bot added 40-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 25, 2026
@jkleinsc jkleinsc merged commit 44f02f6 into 40-x-y Mar 26, 2026
116 of 117 checks passed
@jkleinsc jkleinsc deleted the trop/40-x-y-bp-fix-hex-encode-windows-notification-icon-temp-filenames-1774456208329 branch March 26, 2026 15:48
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Mar 26, 2026

Release Notes Persisted

Fixed a bug where Windows notification icons could fail to save because their temporary filenames contained invalid characters.

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

Labels

40-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants