From: Pierre Ossman Date: Mon, 7 Nov 2022 12:17:27 +0000 (+0100) Subject: Don't do access checks on early clients X-Git-Tag: v1.12.90~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dd8d208e8d1e8852f6f8f16dbac81e461a71dd99;p=tigervnc.git Don't do access checks on early clients They don't get access bits until they've been authenticated, so avoid doing any checks on clients in those early states. --- diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx index 34cda378..79769e93 100644 --- a/win/winvnc/VNCServerWin32.cxx +++ b/win/winvnc/VNCServerWin32.cxx @@ -364,9 +364,11 @@ void VNCServerWin32::getConnInfo(ListConnInfo * listConn) if (!conn) continue; - if (conn->accessCheck(rfb::SConnection::AccessPtrEvents | - rfb::SConnection::AccessKeyEvents | - rfb::SConnection::AccessView)) + if (!conn->authenticated()) + status = 3; + else if (conn->accessCheck(rfb::SConnection::AccessPtrEvents | + rfb::SConnection::AccessKeyEvents | + rfb::SConnection::AccessView)) status = 0; else if (conn->accessCheck(rfb::SConnection::AccessView)) status = 1;