git ssb


Dominic / patchbay

Add blob screen view.

Closed cel wants to merge commits into master from blob
cel · 12/1/2016, 10:29:41 PM

Add blob screen view.

This uses a sandboxed iframe to load blobs. It works for html blobs and images. An embedded web page can still access remote resources via images (if allowed by ssb-ws's CSP), but scripts are disabled by the sandbox. I haven't tested this in Electron.

This is a step towards bundling applications but for now is just for plain html files and media.


Find some blobs to try:

$ sbot '[{"$filter": {"dest": {"$prefix": "&"}, "rel": ["mentions", {"$prefix": ""}, {"$gt": null}]}}]' | jq -r '.dest + " " + .rel[1]' | grep html$
dinosaur mentioned this pull request in ## `git-update` (this message format recently changed in %ONpq0lnq/eVm3WqgzPn/xgtF8AAuDMztEIEQRBF9MEE=.sha256) me pushing an update to pat
cel updated the branch to e33a98ab · 12/9/2016, 4:40:59 PM
%PlS5uZMdgIU5I7MszRwO4kXHH2PXsHAW/9F5WW6WLoU=.sha256 Dominic · 12/28/2016, 6:31:02 AM

what do we need to do to disable remote images?

%hz5V00r1YkJl8MIADXZYdvnGd9H5pZqvp3VuJLTKYCk=.sha256 mix · 1/12/2017, 1:14:50 AM

This pull request looks really interesting. It also looks like it's pre-depject 3 D:

Cel are you interested in seeing if this can be brough up to date, or shall we leave this for now?

%wTA6KmnlkumXnvk2bUDkAuBe4HNPLd/13ScyWE2+/Ls=.sha256 mix · 1/12/2017, 1:15:25 AM

cc @cel

%rTw8imBACqozWcV4zJULQEL+hxCUZf26jZ5j/qIIv6g=.sha256 cel · 1/12/2017, 12:06:05 PM

@mixmix it is updated for depject 3 and should merge cleanly. it may need style attention to handle overflow of large images/pages though.


what do we need to do to disable remote images?

The straightforward way is to update ssb-ws to serve blobs with a CSP header. Another way is to fetch the blob in the client, detect the blob's filetype, and inject a CSP meta tag into it if it is an html file. (This is more hacky, but is what the ssb-frame patchbay integration does)

%gLm6/xdTbnFMDzMdCP4YzKKgbDWcTjmHPOmMgSkT9Mc=.sha256 mix · 1/13/2017, 2:57:55 PM

as far as I know, styling inside of iframes is not a thing right ? Looking really good. I've added an MCSS pattern to this

mix updated the branch to 322f2e6b · 1/13/2017, 2:58:26 PM
mix updated the branch to 3c2247fb · 1/13/2017, 3:00:09 PM
mix deleted the blob branch · 1/13/2017, 3:01:10 PM
%y1zzDNE2M9sBuC/0fkWF5QuJXxHEViH1yEE/9IRxcMw=.sha256 mix · 1/13/2017, 3:01:26 PM


%O4JQ7sYIot+IHCYhr7gpPrOgu6erWqXSZeF/SEF9F5U=.sha256 cel · 1/13/2017, 9:56:16 PM

@mixmix cool, thanks!

Built with git-ssb-web