HelloZeroNet / HelloZeroNet/ZeroNet

Allowed Clearnet resource switch

Open
#2,643 10 comments 1 reaction 1 assignee Claimed by @HelloZeroNet View on GitHub
enhancement
Dominant language
JavaScript
Stars
18.8k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.