Skip to content

Commit

Permalink
Do not use 0 in the generated temporary password
Browse files Browse the repository at this point in the history
Fixes #448
  • Loading branch information
szszszsz committed Aug 11, 2021
1 parent f50fac8 commit 14e991a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GUI/Authentication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void Authentication::clearTemporaryPassword(bool force){
QByteArray Authentication::generateTemporaryPassword() const {
static std::random_device rd;
static std::mt19937 mt(rd());
static std::uniform_int_distribution<unsigned char> dist(0, 0xFF);
static std::uniform_int_distribution<unsigned char> dist(1, 0xFF);

auto temporary_password_length = 25;
QByteArray tmp_p(temporary_password_length, 0);
Expand Down

0 comments on commit 14e991a

Please sign in to comment.