Widget: support CSP nonces for injected styles
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
Rechercherichtung
Start by locating the loader and the code that creates styles for the chat panel and lazy pre-chat form; the issue does not name files or tests. Trace how script-tag installs can read the script nonce and how ESM configuration is defined, then inspect existing widget tests. Done means every created style element accepts the host nonce, nonce-based tests cover the loader, panel, and lazy pre-chat styles, and behavior without a nonce remains unchanged.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What problem would this solve?
The widget injects <style> elements into its shadow roots for the launcher, chat panel, and pre-chat form. On sites with a strict Content Security Policy that blocks inline styles, those styles can be rejected, leaving the widget unstyled or unusable. This affects both the initial loader and styles added when the pre-chat form loads.
What would you like to happen?
Let the widget apply a host-provided CSP nonce to every style element it creates. For script-tag installs, it could use the nonce on the ChatCops script; ESM users should have a configuration option to provide one. Document the setup and add tests covering the loader, panel, and lazy pre-chat styles under a nonce-based policy. Keep the existing behavior unchanged when no nonce is configured.
Contributing
- I'd like to work on this myself
- Vorherrschende Sprache
- TypeScript
- Sterne
- 13
- Forks
- 7
- Ø Merge
- 3 Std. 28 Min.
- Gemergte PRs (30 T.)
- 296
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codercops/chatcops
-
Core README lists old default modelsEvtl. vergeben @prakashNalla hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
codercops/chatcops#503 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Widget: theme.tokens to set any color or size token, and the full token table in the docsEvtl. vergeben @Sreehita-here hat das heute übernommen. Offenhacktoberfest
codercops/chatcops#500 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Widget: a header menu with New conversation, Download transcript and a privacy linkEvtl. vergeben @anurag2787 hat das heute übernommen. Offenhacktoberfest
codercops/chatcops#496 · 4 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Widget: keep a message sent while offline, and send it when the connection is backEvtl. vergeben @Saifjafri212213 hat das heute übernommen. Offenhacktoberfest
codercops/chatcops#495 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Widget: copy a completed assistant replyEvtl. vergeben @piyusshhjangid hat das heute übernommen. Offenhacktoberfest
codercops/chatcops#477 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codercops/chatcops
Ähnliche Issues
-
area:cli bug P4
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug from-studio
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
esengine/DeepSeek-Reasonix#14868 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
linxiv-dev/linXiv#384 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
scope:core type:security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
follow-redirects updateOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
mailgun/mailgun.js#544 ·