Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 - clean stega from salaries data string #673

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

mathiazom
Copy link
Contributor

@mathiazom mathiazom commented Sep 18, 2024

Since salaries data is encoded as a simple string, Sanity assumes it's fine to apply stega to it in preview. But JSON.parse begs to differ, causing CompensationsPreview to crash. This has now been fixed by using the stega cleaning utility stegaClean on the salaries data object.

Updated README.md to include a section explaining this pitfall.

Checklist

Please ensure that you’ve completed the following checkpoints before submitting your pull request:

  • Documentation: Relevant documentation has been added or updated (if applicable).
  • Testing: Have you tested your changes thoroughly?

Since salaries data is encoded as a simple string, Sanity assumes it's fine to apply stega to it. But JSON.parse begs to differ...
Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
variant-no ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 0:49am
variant-se-2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 0:49am

@mathiazom mathiazom merged commit 326cf9e into v3 Sep 18, 2024
6 checks passed
@mathiazom mathiazom deleted the fix/v3-stega-clean-salaries-data-string branch September 18, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants