HelloZeroNet / HelloZeroNet/ZeroNet

Allowed Clearnet resource switch

Aperta
#2,643 10 commenti 1 reazione 1 assegnatario Rivendicata da @HelloZeroNet Vedi su GitHub
enhancement
Lingua principale
JavaScript
Stelle
18.8k
Fork
2.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Is your feature request related to a problem? Please describe.**

Copied from [this ZeroTalk thread](http://127.0.0.1:43110/Talk.ZeroNetwork.bit/?Topic:1602120041_114yCZGnUqTUcasBbAKUS6xmhQyDPC1ZXt/Iframe+insertion+How+does+TorrentFreak+zite+does+that):

> So... I was surfing around and watching variety of zites at Sites.ZeroNetwork.bit.
>
> Then, I've stumbled upon this zite: http://127.0.0.1:43110/1JNqdTGVATFWRLzzYwVu19CuWYus5VmoUS/
>
> This is TorrentFreak's direct iframe. I mean, this is the fully operational website inside the ZeroNet frame, inserted there by another iframe. In user's data folder it simply looks like this:
>
> ```
>
> ```
>
> Now, if you can allow any website to be rendered from the inside of zeronet iframe, it can possibly lead to some point of anonimity breach, no? I thought, that if you're inside the zeronet iframe, you should not be able to include any other iframes? It's just you can include anything as an iframe in your zite (and hide it), and the end-user won't even know it is there. The hidden iframe can do some malicious things (like monero mining, i.e.), and the page shown could be usual zite to held end-user's attention long enough.
>
> Why iframing external http/https resources is allowed?
>
> -- smashbuckler

**Describe the solution you'd like**
A switch on /Config:

**Allow sites to use Clearnet resources:**
- Yes
- Yes, but warn me when they do
- No

A whitelist should probably be implemented as well.

**Additional context**
This can probably be easily controlled with CSP: the current value works for the 'Yes' option, more limits can be added for 'No', and `Content-Security-Policy-Report-Only` should be used for warnings.

According to some random site on the internet, CSP value limit is around 2048 bytes which should be more than enough for our use cases, including potential URL whitelists.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.