diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-08-07 10:35:51 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-08-07 11:02:18 +0200 |
commit | 36b19b946dfca1ec6e098dc31ceaf1bf23f33977 (patch) | |
tree | d51735ca82bb5337c71acd2c90392230e941e8fe /common/rfb/CSecurityMSLogonII.cxx | |
parent | c9b46b771f5ebbc63c4aef4743c157c4f7407ac9 (diff) | |
download | tigervnc-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/CSecurityMSLogonII.cxx')
-rw-r--r-- | common/rfb/CSecurityMSLogonII.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/CSecurityMSLogonII.cxx b/common/rfb/CSecurityMSLogonII.cxx index e721cdfc..24bd4cbd 100644 --- a/common/rfb/CSecurityMSLogonII.cxx +++ b/common/rfb/CSecurityMSLogonII.cxx @@ -127,10 +127,10 @@ void CSecurityMSLogonII::writeCredentials() rs.readBytes(user, 256); rs.readBytes(pass, 64); if (username.size() >= 256) - throw AuthFailureException("username is too long"); + throw Exception("username is too long"); memcpy(user, username.c_str(), username.size() + 1); if (password.size() >= 64) - throw AuthFailureException("password is too long"); + throw Exception("password is too long"); memcpy(pass, password.c_str(), password.size() + 1); // DES-CBC with the original key as IV, and the reversed one as the DES key |