]> source.dussan.org Git - tigervnc.git/commitdiff
Better error message for authentication failure
authorPierre Ossman <ossman@cendio.se>
Wed, 7 Aug 2024 09:05:47 +0000 (11:05 +0200)
committerPierre Ossman <ossman@cendio.se>
Wed, 7 Aug 2024 09:07:37 +0000 (11:07 +0200)
vncviewer/CConn.cxx

index 1f1a590ebe7b0f6a6193f547c2e20a4082b1363a..219c850b990743feda413093e45dc66dd0f680ef 100644 (file)
@@ -274,6 +274,10 @@ void CConn::socketEvent(FL_SOCKET fd, void *data)
   } catch (rfb::AuthCancelledException& e) {
     vlog.info("%s", e.str());
     disconnect();
+  } catch (rfb::AuthFailureException& e) {
+    vlog.error(_("Authentication failed: %s"), e.str());
+    abort_connection(_("Failed to authenticate with the server. Reason "
+                       "given by the server:\n\n%s"), e.str());
   } catch (rdr::Exception& e) {
     vlog.error("%s", e.str());
     abort_connection_with_unexpected_error(e);