Automattic / simplenote-electron

Simplenote for Web, Windows, and Linux
https://app.simplenote.com
GNU General Public License v2.0
4.69k stars 553 forks source link

Fix: Prevent preview from crashing on email address #3205

Closed codebykat closed 1 month ago

codebykat commented 1 month ago

Fix

This PR fixes #3200. The crash was a missing polyfill for Buffer that was only causing a runtime crash when the isemail code ran.

Test

  1. Create a Markdown note with an email address in it
  2. Preview the note
  3. Verify the note displays correctly

Release

Fixed a bug where an email address in a note would cause the preview to be blank.

jcamp commented 1 month ago

Running 2.22.0 beta and still has the issue?

Please note this is not related to ANY email - JUST the email address of the logged in user. All other email addresses work fine.

codebykat commented 1 month ago

@jcamp Huh, I can't reproduce that... and there's no code that is doing anything to detect the email address of the logged in user. Does your email address happen to contain any unusual characters that might be causing the preview to crash? Also, can you confirm this is still happening on https://app.simplenote.com ? The website is running the latest version of the code, which includes this fix (the current version of the beta app may not have been rebuilt after this addition, as we've been working on the build process).

jcamp commented 1 month ago

Fixed now on latest Beta thanks.

Sent from Gmail Mobile

On Thu, 6 Jun 2024 at 09:10, Kat Hagan @.***> wrote:

@jcamp https://github.com/jcamp Huh, I can't reproduce that... and there's no code that is doing anything to detect the email address of the logged in user. Does your email address happen to contain any unusual characters that might be causing the preview to crash? Also, can you confirm this is still happening on https://app.simplenote.com ? The website is running the latest version of the code, which includes this fix (the current version of the beta app may not have been rebuilt after this addition, as we've been working on the build process).

— Reply to this email directly, view it on GitHub https://github.com/Automattic/simplenote-electron/pull/3205#issuecomment-2151669870, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEEJ2SHI43N2WBGOE2NY3ZGAKPJAVCNFSM6AAAAABIN5D77SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGY3DSOBXGA . You are receiving this because you were mentioned.Message ID: @.***>