Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application/widgets/customcontrol/passwordinputdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void PasswordInputDialog::initUi()
// 限制中文和中文字符
#if QT_VERSION_MAJOR > 5
qDebug() << "QT_VERSION_MAJOR > 5, setting regular expression validator";
QRegularExpression regExp("^[A-Za-z0-9`~!@#$%^&*()_-+=<>,.\\/ ]+$");
QRegularExpression regExp("^[A-Za-z0-9`~!@#$%^&*()_+=<>,.\\/ -]+$");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Passwords are written to logs

When a Qt6 user enters a password and submits an encryption or decryption operation, Utils::executWithInputOutputCmd logs *inPut verbatim at basestruct/utils.cpp:155; the enabled dialogs pass the entered password to that helper as cryptsetup input, so plaintext passwords are written to debug logs.

Remove or redact the input logging in Utils::executWithInputOutputCmd.

Also at application/widgets/decryptdialog.cpp:70.

Prompt for AI agents
In `application/widgets/customcontrol/passwordinputdialog.cpp` at line 83:

**Passwords are written to logs**

When a Qt6 user enters a password and submits an encryption or decryption operation, `Utils::executWithInputOutputCmd` logs `*inPut` verbatim at `basestruct/utils.cpp:155`; the enabled dialogs pass the entered password to that helper as cryptsetup input, so plaintext passwords are written to debug logs.

Remove or redact the input logging in `Utils::executWithInputOutputCmd`.

Also at `application/widgets/decryptdialog.cpp:70`.

QRegularExpressionValidator *regExpValidator = new QRegularExpressionValidator(regExp, this);
#else
qDebug() << "QT_VERSION_MAJOR <= 5, setting regular expression validator";
Expand Down
2 changes: 1 addition & 1 deletion application/widgets/decryptdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void DecryptDialog::initUi()
// 限制中文和中文字符
#if QT_VERSION_MAJOR > 5
qDebug() << "[DecryptDialog] Using QRegularExpression for validator (QT_VERSION_MAJOR > 5).";
QRegularExpression regExp("^[A-Za-z0-9`~!@#$%^&*()_-+=<>,.\\/ ]+$");
QRegularExpression regExp("^[A-Za-z0-9`~!@#$%^&*()_+=<>,.\\/ -]+$");
QRegularExpressionValidator *regExpValidator = new QRegularExpressionValidator(regExp, this);
#else
qDebug() << "[DecryptDialog] Using QRegExp for validator (QT_VERSION_MAJOR <= 5).";
Expand Down
Loading