From 4b28667e90cff336ea39c085f74075ff21c25eff Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Tue, 17 Aug 2021 13:13:51 +0300 Subject: [PATCH 1/2] Fix possible missing clipboard deinit --- common/rfb/VNCServerST.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index fd13cf3..a564021 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -273,6 +273,11 @@ void VNCServerST::removeSocket(network::Socket* sock) { std::list::iterator ci; for (ci = clients.begin(); ci != clients.end(); ci++) { if ((*ci)->getSock() == sock) { + + if (clipboardClient == *ci) + handleClipboardAnnounce(*ci, false); + clipboardRequestors.remove(*ci); + // - Delete the per-Socket resources delete *ci; From d80eb39686ee394b6061072e62aed1f8c1e73727 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Tue, 17 Aug 2021 13:30:33 +0300 Subject: [PATCH 2/2] Fix DigitalOcean load balancer websocket connection (they too used wrong case in a header) --- common/network/websocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/network/websocket.c b/common/network/websocket.c index 3d3111d..47ac11d 100644 --- a/common/network/websocket.c +++ b/common/network/websocket.c @@ -583,7 +583,7 @@ int parse_handshake(ws_ctx_t *ws_ctx, char *handshake) { headers->host[end-start] = '\0'; headers->origin[0] = '\0'; - start = strstr(handshake, "\r\nOrigin: "); + start = strcasestr(handshake, "\r\nOrigin: "); if (start) { start += 10; } else {