ozgrozer / chatgpt-artifacts

Bring Claude's Artifacts feature to ChatGPT
https://x.com/ozgrozer/status/1808677091996541251
GNU General Public License v3.0
427 stars 78 forks source link

XSS Prevention #2

Open danny-avila opened 3 months ago

danny-avila commented 3 months ago

Hi @ozgrozer 👋

Great job on this. I've been working on something similar but found the choice to use iframe not very sensitive to security.

Any thoughts on how the current code could mitigate XSS?

image

danny-avila commented 3 months ago

In a more "nefarious" example, and just through prompting, I can "override" the entire app

image

ozgrozer commented 3 months ago

Try this commit. It should prevent XSS.