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

fix(regex): global flag should not reuse without reset lastIndex #3116

Closed
wants to merge 4 commits into from

Conversation

nnnnoel
Copy link

@nnnnoel nnnnoel commented Oct 11, 2023

What: Fixed lastIndex is not 0 on Regex with global flag when reuse

Why: this is unsafe

How:

Checklist:

  • Documentation
  • Tests
  • Code complete
  • Changeset

@changeset-bot
Copy link

changeset-bot bot commented Oct 11, 2023

🦋 Changeset detected

Latest commit: d2cb4c2

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

This PR includes changesets to release 3 packages
Name Type
@emotion/babel-plugin Patch
@emotion/jest Patch
@emotion/serialize 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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 11, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d2cb4c2:

Sandbox Source
Emotion Configuration

@nnnnoel nnnnoel changed the title fix(regex): global flag should not be reuse without reset lastIndex fix(regex): global flag should not reuse without reset lastIndex Oct 11, 2023
@emmatown
Copy link
Member

lastIndex is not used in replace so this is not relevant

@emmatown emmatown closed this Dec 23, 2023
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.

None yet

2 participants