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

(core) - Prevent ignored characters from being sanitized in strings #2295

Merged
merged 2 commits into from Feb 23, 2022

Conversation

kitten
Copy link
Member

@kitten kitten commented Feb 21, 2022

Resolve #2290
Resolve #1960

Summary

This updates our string sanitization to exclude replacing ignored characters inside of strings.
This is pretty crude but should stop us from accidentally messing up queries to the point where they don't produce valid hashes any longer.

Edit: Bundlesize will be affected in shared import by +59B.

Set of changes

  • Update createRequest's stringification to exclude strings in sanitization
  • Add appropriate test (previous test wasn't actually checking our string sanitization)

@changeset-bot
Copy link

changeset-bot bot commented Feb 21, 2022

🦋 Changeset detected

Latest commit: a1cc028

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@urql/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kitten kitten merged commit ee4a15b into main Feb 23, 2022
@kitten kitten deleted the fix/sanitizing-outside-strings-only branch February 23, 2022 22:36
@urql-ci urql-ci mentioned this pull request Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants