mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
* fix: hex-encode Windows notification icon temp filenames 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> * Update shell/browser/notifications/win/notification_presenter_win.cc Co-authored-by: Robo <hop2deep@gmail.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>