ipython-contrib / jupyter_contrib_nbextensions

A collection of various notebook extensions for Jupyter
http://jupyter-contrib-nbextensions.readthedocs.io/en/latest
Other
5.22k stars 806 forks source link

chrome_clipboard - v2 - page ran insecure #157

Closed updiversity closed 9 years ago

updiversity commented 9 years ago

I tried to paste an image I took from a pdf file and I got this message in the Jacascript Console.

Is it something that can be done in order to have this extension, in v2, working ?

[blocked] The page at 'xxxx' was loaded over HTTPS, but ran insecure content from 'yyyy/KMFF7FTCWLLENB0FN6XSBCP446BE3XJ4.png': this content should also be loaded over HTTPS. jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:6x.support.cors.e.crossDomain.send jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:6x.extend.ajax jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:6send_to_server chrome_clipboard.js:50reader.onload

I am running on ipython 2.3.0 and python 2.7.0.

juhasch commented 9 years ago

The 2.x version does not have the contents service. There is no good way to implement this feature without it.

updiversity commented 9 years ago

I just installed ipython 3 dev version, with the corresponding nbextensions... however, when I try to either drag&drop (through drag & drop extension) or to copypaste (through chrome clipboard extension), i still received the same error message type.

[blocked] The page at 'https://127.0.0.1:8888/notebooks/experiments/financial-model/notebooks/Untitled1.ipynb' was loaded over HTTPS, but ran insecure content from 'http://127.0.0.1:8888/api/contents/experiments/financial-model/notebooks/Untitled1.ipynb/UWH63LXTOY8KQM6RSDAWICDO9IKBMDGT.png': this content should also be loaded over HTTPS. :8888/static/components/jquery/jquery.min.js:6x.support.cors.e.crossDomain.send :8888/static/components/jquery/jquery.min.js:6x.extend.ajax :8888/static/components/jquery/jquery.min.js:6send_to_server :8888/nbextensions/chrome_clipboard.js:51reader.onload :8888/nbextensions/chrome_clipboard.js:78 failed to send to server: UWH63LXTOY8KQM6RSDAWICDO9IKBMDGT.png

updiversity commented 9 years ago

Hi,

I just wanted to provide you further information regarding my investigation on these problems... Now, I have removed the HTTPS protocol, I got my server working in pure HTTP. However, the clipboard and the drag&drop still do not work. Here are the error messages I am getting:

chrome-clipboard: Uncaught ReferenceError: data is not defined chrome_clipboard.js:39 send_to_server chrome_clipboard.js:39 reader.onload chrome_clipboard.js:78

dragdrop: PUT http://127.0.0.1:8888/api/contents/experiments/financial-model/notebooks/Untitled0.ipynb/id.jpg 500 (Internal Server Error) :8888/static/components/jquery/jquery.min.js:6

x.support.cors.e.crossDomain.send :8888/static/components/jquery/jquery.min.js:6 x.extend.ajax :8888/static/components/jquery/jquery.min.js:6 send_to_server drag-and-drop.js:49 reader.onload drag-and-drop.js:73 fail drag-and-drop.js:47

Hope this can help you to investigate further, as on my side, I can't go further I think :(

juhasch commented 9 years ago

Thanks for investigating. I updated the extensions to reflect recent changes in IPython and also fix some bugs in https://github.com/ipython-contrib/IPython-notebook-extensions/pull/160

updiversity commented 9 years ago

thanks for the update... just tried them. When I am running over HTTP (ipython 3), it finally works :)

unfortunately, when I go back to HTTPS, I still get this kind of error message

OPTIONS http://127.0.0.1:8888/api/contents/experiments/financial-model/notebooks/Untitled0.ipynb/QCB12IC4UCK8BPRMGJSPMAWDSHSWKLMW.png jquery.min.js:6 x.support.cors.e.crossDomain.send jquery.min.js:6 x.extend.ajax jquery.min.js:6 send_to_server chrome_clipboard.js:51 reader.onload chrome_clipboard.js:78 failed to send to server: QCB12IC4UCK8BPRMGJSPMAWDSHSWKLMW.png

Should I reopen it ?

juhasch commented 9 years ago

This is not surprising, as http is currently hardcoded into the extension. Not sure how to change this.

updiversity commented 9 years ago

it looks that there is a simple solution... look at that page http://stackoverflow.com/questions/25496039/blocked-the-page-at-x-was-loaded-over-https-but-ran-insecure-content-from hope this help :)