]> source.dussan.org Git - tigervnc.git/commitdiff
Don't do access checks on early clients
authorPierre Ossman <ossman@cendio.se>
Mon, 7 Nov 2022 12:17:27 +0000 (13:17 +0100)
committerPierre Ossman <ossman@cendio.se>
Mon, 7 Nov 2022 12:17:27 +0000 (13:17 +0100)
They don't get access bits until they've been authenticated, so avoid
doing any checks on clients in those early states.

win/winvnc/VNCServerWin32.cxx

index 34cda3788cf1431f97da96da2a1acc855c993e4f..79769e93cd787ea2434839d5397ba497fc1005cc 100644 (file)
@@ -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;