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

"invalid group specifier name" error in Safari after upgrade to 1.0.12 #259

Closed
scottohara opened this issue Jun 5, 2022 · 7 comments
Closed
Labels

Comments

@scottohara
Copy link

We use xss in one of our front-end applications (bundled using webpack).

After recently upgrading from v1.0.11 to v1.0.12, our production error monitoring service started reporting occurrences of the following error:

SyntaxError: Invalid regular expression: invalid group specifier name

On further investigation we found that it was only impacting Safari users. Downgrading back to v1.0.11 resolves the issue.

We hope to follow up this issue with an example that demonstrates the error; but in the meantime we wanted to make you aware of the issue in case you may already have an idea which of the four fix: commits that went into v1.0.12 could be causing this.

@scottohara
Copy link
Author

The following HTML will demonstrate the issue:

<!DOCTYPE html>
<html>
  <head>
    <script src="https://rawgit.com/leizongmin/js-xss/master/dist/xss.js"></script>
  </head>
</html>

Steps to reproduce:

  1. Save the above HTML to a file
  2. Launch Chrome and Safari
  3. Open the browser consoles in both browsers
  4. Navigate to the HTML file
  5. Note that in Chrome there are no errors/warnings
  6. Note that in Safari, the "invalid group specifier name" occurs

I hope this helps.

@bahung1221
Copy link

+1, same issue on safari

1 similar comment
@stangao
Copy link

stangao commented Jun 6, 2022

+1, same issue on safari

@leizongmin leizongmin added the bug label Jun 6, 2022
@sashkomatviychuk
Copy link

I have the same issue with graphql/graphql-playground package during running the tests

@leizongmin
Copy link
Owner

Hi all, I am very sorry to heard that. This problem was introduced in this MR #257 . I have just revert this commit and released a new version xss@1.0.13. You can try this new version.

@scottohara
Copy link
Author

Thanks for the quick response @leizongmin. I can confirm that v1.0.13 no longer has the issue in Safari.

Much appreciated. 🎉

@yuningjiang123
Copy link

这个改动成功让我们项目首页白屏了 差点要记大过 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants