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

[Bug] Stylus breaks sites made with caseme.io (using React) #1803

Open
fireattack opened this issue Aug 10, 2024 · 1 comment
Open

[Bug] Stylus breaks sites made with caseme.io (using React) #1803

fireattack opened this issue Aug 10, 2024 · 1 comment

Comments

@fireattack
Copy link

Bug Report

Bug Description

Injecting any rule, even the ones will not match, would break any websites built with this caseme.io service, including their homepage: https://caseme.io/ (I originally found this bug when visiting another site, https://roitman.io/blog/91.)

There are bunch of errors in console from React:

chunk-WARRYLZU.js:6 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at jo (chunk-WARRYLZU.js:6:5244)
    at Dh (chunk-WARRYLZU.js:8:15317)
    at Bd (chunk-WARRYLZU.js:8:39835)
    at Wd (chunk-WARRYLZU.js:8:39592)
    at Hh (chunk-WARRYLZU.js:8:39504)
    at $d (chunk-WARRYLZU.js:8:34562)
    at pi (chunk-WARRYLZU.js:1:28990)
    at MessagePort.si (chunk-WARRYLZU.js:1:29381)
chunk-WARRYLZU.js:8 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at pu (chunk-WARRYLZU.js:6:4788)
    at Qd (chunk-WARRYLZU.js:8:45306)
    at Wd (chunk-WARRYLZU.js:8:39531)
    at Hh (chunk-WARRYLZU.js:8:39504)
    at $d (chunk-WARRYLZU.js:8:34562)
    at pi (chunk-WARRYLZU.js:1:28990)
    at MessagePort.si (chunk-WARRYLZU.js:1:29381)
chunk-WARRYLZU.js:6 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at pu (chunk-WARRYLZU.js:6:4788)
    at Qd (chunk-WARRYLZU.js:8:45306)
    at Wd (chunk-WARRYLZU.js:8:39531)
    at Hh (chunk-WARRYLZU.js:8:39504)
    at $d (chunk-WARRYLZU.js:8:34562)
    at pi (chunk-WARRYLZU.js:1:28990)
    at MessagePort.si (chunk-WARRYLZU.js:1:29381)
chunk-WARRYLZU.js:8 Uncaught Error: Minified React error #423; visit https://reactjs.org/docs/error-decoder.html?invariant=423 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at Qd (chunk-WARRYLZU.js:8:44966)
    at Wd (chunk-WARRYLZU.js:8:39531)
    at Bh (chunk-WARRYLZU.js:8:39462)
    at vl (chunk-WARRYLZU.js:8:39321)
    at Ou (chunk-WARRYLZU.js:8:35739)
    at $d (chunk-WARRYLZU.js:8:34695)
    at pi (chunk-WARRYLZU.js:1:28990)
    at MessagePort.si (chunk-WARRYLZU.js:1:29381)

Screenshots

image

image

CSS Code

Any rule would break it. E.g.

@-moz-document domain("caseme.io") {
dummy > rule {
    display: none;
}
}

System Information

  • OS: Windows 10
  • Browser: Chrome 127.0.6533.100, Firefox 129.0
  • Stylus Version: 1.5.47

Additional Context

@tophf
Copy link
Member

tophf commented Aug 10, 2024

The site explicitly throws on any foreign element added under <html> node. It's the first time I see such a site. As a workaround you can enable Circumvent CSP 'style-­src' via adoptedSty­leSheets in the options.

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

No branches or pull requests

2 participants