[Interest] qtwebview with qtwebchannel

Artem Sidyakin artem.sidyakin at qt.io
Sun Aug 26 19:47:54 CEST 2018


> if anybody could tell me it is working

I have an example working with Qt 5.11.1 on Mac OS and Android.
Unfortunately, I cannot check if it works on iOS - that’s why I was guessing.

> I am wondering if this is not a security issue to open a socket

Not an expert myself, but it is a bit more safe if you'll bind to localhost/127.0.0.1 and not to 0.0.0.0 :)

In general, here’re some articles on the subject:
- https://gist.github.com/subudeepak/9897212#websockets---security-overview
- https://security.stackexchange.com/questions/161957/do-websockets-represent-a-security-problem-to-my-local-machine

So it looks like it is indeed a potential vulnerability.

---
Artem Sidyakin

> On 26 Aug 2018, at 16:38, Sylvain Pointeau <sylvain.pointeau at gmail.com> wrote:
> 
> hello,  it is different since a webview in ios is a wrapper to UIWebView (which is now deprecated in ios 12 BTW).
> 
> I tried everything but i could not make it work on ios, I may have to try it again with a newer Qt version.... In the meantime nobody really tried and could proove that it works so I am a bit puzzled on this thing.
> 
> if anybody could tell me it is working then ot would save me significant time
> 
> Additionally I am wondering if this is not a security issue to open a socket, does it means others could access it?
> 
> Best regards,
> Sylvain
> 
> 
> 
> On Fri, 17 Aug 2018 at 19:11, Artem Sidyakin <artem.sidyakin at qt.io> wrote:
> Have you already tried WebView (http://doc.qt.io/qt-5/qml-qtwebview-webview.html) with WebChannel (http://doc.qt.io/qt-5/qml-qtwebchannel-webchannel.html) over WebSocket (https://doc.qt.io/qt-5/qml-qtwebsockets-websocketserver.html)? You referred to your previous e-mail, but I haven’t seen it, sorry.
> 
> I have a working example on desktop, but I haven’t tried it on iOS, although I don’t see why it would be any different. Except if iOS doesn’t allow to open a WebSocket. So if you were able to make it work on desktop but failed on iOS, then I guess that’s the case.
> 
> ---
> Artem Sidyakin
> 
> > On 11 Aug 2018, at 08:32, Sylvain Pointeau <sylvain.pointeau at gmail.com> wrote:
> > 
> > 
> > 
> > Le jeu. 7 avr. 2016 à 13:17, Sylvain Pointeau <sylvain.pointeau at gmail.com> a écrit :
> > 
> > 
> > On Thu, Apr 7, 2016 at 11:23 AM, Milian Wolff <milian.wolff at kdab.com> wrote:
> > On Thursday, April 7, 2016 9:38:01 AM CEST Sylvain Pointeau wrote:
> > > Hello,
> > >
> > > Do you have any idea how to use WebSocket or WebChannel on iOS?
> > > Should I conclude that we cannot do hybrid apps with Qt on iOS (works on
> > > desktop, don't know about Android)?
> > 
> > I'm not an iOS person but the problem you are describing has nothing to do
> > with the webchannel - you seem to fail already when constructing a websocket
> > server. Have you tried to run the examples/tests of QWebSocket on iOS? That's
> > where I'd start.
> > 
> > WebSocketServer works if the QML application creates the websocket and connects to it.
> > However it does not work if we connect from html as shown in my example copied in my previous email.
> > 
> > Best regards,
> > Sylvain
> > 
> > is there anyone that could use a webview on ios and communicate with it in Qml?
> > 
> > Best regards,
> > Sylvain
> > 
> >  
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> 



More information about the Interest mailing list