Skip to content

Commit

Permalink
Only read first password from file
Browse files Browse the repository at this point in the history
Read just the first password and ignore anything else in the password
file. This allows you to reuse a password file from the server that also
includes a view-only password.

This fixes a regression introduced in b99daad.
  • Loading branch information
CendioOssman committed Aug 30, 2024
1 parent 1b0387a commit 49a087e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vncviewer/UserDialog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void UserDialog::getUserPasswd(bool secure_, std::string* user,
}

if (!user && passwordFileName[0]) {
std::vector<uint8_t> obfPwd(256);
std::vector<uint8_t> obfPwd(8);
FILE* fp;

fp = fopen(passwordFileName, "rb");
Expand Down

0 comments on commit 49a087e

Please sign in to comment.