diff options
author | Christian Beier <dontmind@freeshell.org> | 2018-10-01 21:13:11 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2018-10-01 21:13:11 +0200 |
commit | 459046efc023161642c599809c6a5ef733035a12 (patch) | |
tree | 0f7c80769dd38635ed7374771778b9758c494895 /libvncserver | |
parent | ffe33574918cf31926ed37caef12f24e73b2d478 (diff) | |
download | libtdevnc-459046efc023161642c599809c6a5ef733035a12.tar.gz libtdevnc-459046efc023161642c599809c6a5ef733035a12.zip |
websockets: remove Flash fallback
Closes #162
Diffstat (limited to 'libvncserver')
-rw-r--r-- | libvncserver/rfbserver.c | 4 | ||||
-rw-r--r-- | libvncserver/websockets.c | 10 |
2 files changed, 1 insertions, 13 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 7af6aed..ed1365a 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -463,9 +463,7 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen, #ifdef LIBVNCSERVER_WITH_WEBSOCKETS /* - * Wait a few ms for the client to send one of: - * - Flash policy request - * - WebSockets connection (TLS/SSL or plain) + * Wait a few ms for the client to send WebSockets connection (TLS/SSL or plain) */ if (!webSocketsCheck(cl)) { /* Error reporting handled in webSocketsHandshake */ diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c index 4ebff72..d91c4f2 100644 --- a/libvncserver/websockets.c +++ b/libvncserver/websockets.c @@ -61,9 +61,6 @@ static int gettid() { } #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 * 5.2.2. Sending the Server's Opening Handshake @@ -144,13 +141,6 @@ webSocketsCheck (rfbClientPtr cl) if (strncmp(bbuf, "RFB ", 4) == 0) { rfbLog("Normal socket connection\n"); 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) { rfbLog("Got TLS/SSL WebSockets connection\n"); if (-1 == rfbssl_init(cl)) { |