Bug 5218 - HTTPS+NoVNC tries to connect to non-encrypted WebSocket
Summary: HTTPS+NoVNC tries to connect to non-encrypted WebSocket
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Access (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.3.0
Assignee: Samuel Mannehed
URL:
Keywords: hean01_tester, prosaic
Depends on:
Blocks:
 
Reported: 2014-08-19 13:35 CEST by Karl Mikaelsson
Modified: 2014-10-13 13:37 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Karl Mikaelsson cendio 2014-08-19 13:35:54 CEST
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 Samuel Mannehed cendio 2014-08-19 14:23:40 CEST
Fixed with vendordrop in commit 29268.
Comment 2 Henrik Andersson cendio 2014-10-10 11:10:45 CEST
RFS.js: init_vars() calls Websock.js:init() without
arguments which makes stuff break.
Comment 3 Samuel Mannehed cendio 2014-10-10 12:50:43 CEST
(In reply to comment #2)
> RFS.js: init_vars() calls Websock.js:init() without
> arguments which makes stuff break.

29486.
Comment 4 Samuel Mannehed cendio 2014-10-10 14:00:41 CEST
Update in r29487.
Comment 5 Henrik Andersson cendio 2014-10-13 12:13:34 CEST
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 Henrik Andersson cendio 2014-10-13 13:27:31 CEST
(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 Samuel Mannehed cendio 2014-10-13 13:36:14 CEST
(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.

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