aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/SSecurityRSAAES.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-08-07 10:35:51 +0200
committerPierre Ossman <ossman@cendio.se>2024-08-07 11:02:18 +0200
commit36b19b946dfca1ec6e098dc31ceaf1bf23f33977 (patch)
treed51735ca82bb5337c71acd2c90392230e941e8fe /common/rfb/SSecurityRSAAES.cxx
parentc9b46b771f5ebbc63c4aef4743c157c4f7407ac9 (diff)
downloadtigervnc-36b19b946dfca1ec6e098dc31ceaf1bf23f33977.tar.gz
tigervnc-36b19b946dfca1ec6e098dc31ceaf1bf23f33977.zip
Don't abuse auth failure exception
This exception is for when the user fails to authenticate, not all possible errors that might occur during the authentication phase. Use more appropriate exception types for the various other problems that might occur, so that we can present things more accurately to the user.
Diffstat (limited to 'common/rfb/SSecurityRSAAES.cxx')
-rw-r--r--common/rfb/SSecurityRSAAES.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/SSecurityRSAAES.cxx b/common/rfb/SSecurityRSAAES.cxx
index 4aa39111..530dca16 100644
--- a/common/rfb/SSecurityRSAAES.cxx
+++ b/common/rfb/SSecurityRSAAES.cxx
@@ -565,7 +565,7 @@ void SSecurityRSAAES::verifyUserPass()
}
delete valid;
#else
- throw AuthFailureException("No password validator configured");
+ throw Exception("No password validator configured");
#endif
}
@@ -576,7 +576,7 @@ void SSecurityRSAAES::verifyPass()
pg->getVncAuthPasswd(&passwd, &passwdReadOnly);
if (passwd.empty())
- throw AuthFailureException("No password configured for VNC Auth");
+ throw Exception("No password configured");
if (password == passwd) {
accessRights = AccessDefault;