[GH-ISSUE #47] Encrypting local storage causes character set issues #42

Closed
opened 2026-02-25 21:33:59 +03:00 by kerem · 1 comment
Owner

Originally created by @jasonmunro on GitHub (Mar 16, 2016).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/47

Originally assigned to: @jasonmunro on GitHub.

for some reason using the forge.js encryption on a value stored in local storage causes the decrypted value to have incorrect character encoding. It's likely not a bug in forge itself but something we are doing incorrectly. I added a comment to the ini file that this setting is experimental and should be avoided for now. The problem appears to be triggered when a string with a non-ascii character is pulled from the DOM using zepto then stored in the local storage. Open retrieval non-ascii chars are munged.

Originally created by @jasonmunro on GitHub (Mar 16, 2016). Original GitHub issue: https://github.com/cypht-org/cypht/issues/47 Originally assigned to: @jasonmunro on GitHub. for some reason using the forge.js encryption on a value stored in local storage causes the decrypted value to have incorrect character encoding. It's likely not a bug in forge itself but something we are doing incorrectly. I added a comment to the ini file that this setting is experimental and should be avoided for now. The problem appears to be triggered when a string with a non-ascii character is pulled from the DOM using zepto then stored in the local storage. Open retrieval non-ascii chars are munged.
kerem 2026-02-25 21:33:59 +03:00
  • closed this issue
  • added the
    bug
    core
    labels
Author
Owner

@jasonmunro commented on GitHub (Aug 30, 2016):

I fixed this issue by using forge to utf-8 encode and decode the encrypted value. I will remove the warning in the ini file if it turns out to be a solid long term fix.

<!-- gh-comment-id:243344824 --> @jasonmunro commented on GitHub (Aug 30, 2016): I fixed this issue by using forge to utf-8 encode and decode the encrypted value. I will remove the warning in the ini file if it turns out to be a solid long term fix.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#42
No description provided.