websockets: remove Flash fallback

Closes #162
pull/3/head
Christian Beier 6 years ago
parent ffe3357491
commit 459046efc0
No known key found for this signature in database
GPG Key ID: 421BB3B45C6067F8

@ -463,9 +463,7 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen,
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS #ifdef LIBVNCSERVER_WITH_WEBSOCKETS
/* /*
* Wait a few ms for the client to send one of: * Wait a few ms for the client to send WebSockets connection (TLS/SSL or plain)
* - Flash policy request
* - WebSockets connection (TLS/SSL or plain)
*/ */
if (!webSocketsCheck(cl)) { if (!webSocketsCheck(cl)) {
/* Error reporting handled in webSocketsHandshake */ /* Error reporting handled in webSocketsHandshake */

@ -61,9 +61,6 @@ static int gettid() {
} }
#endif #endif
#define FLASH_POLICY_RESPONSE "<cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"*\" /></cross-domain-policy>\n"
#define SZ_FLASH_POLICY_RESPONSE 93
/* /*
* draft-ietf-hybi-thewebsocketprotocol-10 * draft-ietf-hybi-thewebsocketprotocol-10
* 5.2.2. Sending the Server's Opening Handshake * 5.2.2. Sending the Server's Opening Handshake
@ -144,13 +141,6 @@ webSocketsCheck (rfbClientPtr cl)
if (strncmp(bbuf, "RFB ", 4) == 0) { if (strncmp(bbuf, "RFB ", 4) == 0) {
rfbLog("Normal socket connection\n"); rfbLog("Normal socket connection\n");
return TRUE; return TRUE;
} else if (strncmp(bbuf, "<", 1) == 0) {
rfbLog("Got Flash policy request, sending response\n");
if (rfbWriteExact(cl, FLASH_POLICY_RESPONSE,
SZ_FLASH_POLICY_RESPONSE) < 0) {
rfbErr("webSocketsHandshake: failed sending Flash policy response");
}
return FALSE;
} else if (strncmp(bbuf, "\x16", 1) == 0 || strncmp(bbuf, "\x80", 1) == 0) { } else if (strncmp(bbuf, "\x16", 1) == 0 || strncmp(bbuf, "\x80", 1) == 0) {
rfbLog("Got TLS/SSL WebSockets connection\n"); rfbLog("Got TLS/SSL WebSockets connection\n");
if (-1 == rfbssl_init(cl)) { if (-1 == rfbssl_init(cl)) {

Loading…
Cancel
Save