Skip to content

Commit 0b32796

Browse files
committed
update protection tips
1 parent 7188d34 commit 0b32796

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ pnpm zip # make extension.zip
138138

139139
- How to protect your site from this extension:
140140
- Well, tests show that even `Content-Security-Policy: default-src 'none';` header won't prevent injection of extension content-scripts...
141+
- Avoid assigning to `window` or `globalThis` any application object.
142+
See also [accidental global variables and memory leaks](https://www.tutorialspoint.com/explain-in-detail-about-memory-leaks-in-javascript).
141143
- In general, you can incapacitate console functions:
142144
```js
143145
for (const prop in console) {

0 commit comments

Comments
 (0)