www.cendio.com
Bug 5218 - HTTPS+NoVNC tries to connect to non-encrypted WebSocket
: HTTPS+NoVNC tries to connect to non-encrypted WebSocket
Status: CLOSED FIXED
: ThinLinc
Web Access
: trunk
: PC Unknown
: P2 Normal
: 4.3.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2014-08-19 13:35 by
Modified: 2014-10-13 13:37 (History)
Acceptance Criteria:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2014-08-19 13:35:54
from websock.js

> // Check for full binary type support in WebSockets
>     // TODO: this sucks, the property should exist on the prototype
>     // but it does not.
>     try {
>         if (bt && ('binaryType' in (new WebSocket("ws://localhost:17523")))) {
>             Util.Info("Detected binaryType support in WebSockets");
>             wsbt = true;
>         }
>     } catch (exc) {
>         // Just ignore failed test localhost connections
>     }

chrome 36 says:

> [blocked] The page at 'https://localhost:300/main/agent?launch_vnc=1
>  &display=1&vncpassword=asdfasdfasdfasdfasdfasdfasdf' was loaded over
> HTTPS, but ran insecure content from 'ws://localhost:17523/': this
> content should also be loaded over HTTPS.
------- Comment #1 From cendio 2014-08-19 14:23:40 -------
Fixed with vendordrop in commit 29268.
------- Comment #2 From cendio 2014-10-10 11:10:45 -------
RFS.js: init_vars() calls Websock.js:init() without
arguments which makes stuff break.
------- Comment #3 From cendio 2014-10-10 12:50:43 -------
(In reply to comment #2)
> RFS.js: init_vars() calls Websock.js:init() without
> arguments which makes stuff break.

29486.
------- Comment #4 From cendio 2014-10-10 14:00:41 -------
Update in r29487.
------- Comment #5 From cendio 2014-10-13 12:13:34 -------
Now when testing nighly build with commit xxx another issue is raised:

ERROR: WebSocket connection to 'wss://./' failed: Error in connection
establishment: net::ERR_NAME_NOT_RESOLVED

And I wont get further to a vnc connection when using chrome 38.0.2125.101.
------- Comment #6 From cendio 2014-10-13 13:27:31 -------
(In reply to comment #5)

> And I wont get further to a vnc connection when using chrome 38.0.2125.101.

I had a breakpoint preventing me to login, it works as expected but still logs
an error to console.
------- Comment #7 From cendio 2014-10-13 13:36:14 -------
(In reply to comment #5)
> ERROR: WebSocket connection to 'wss://./' failed: Error in connection
> establishment: net::ERR_NAME_NOT_RESOLVED

This is due to peculiarities in Chrome.... This test works in most browsers:

'binaryType' in WebSocket.prototype

But in Chrome we need to check:

(new WebSocket(ws_schema + '://.').binaryType

And Chrome evaluates the url but properly creates the object despite any errors
in the url, there is no way to get rid of this message. The error message has
no effect.