Skip to content
Commit c8913c38 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa
Browse files

queries: Consider an empty password as a request cancellation.

Empty passwords do not make sense as valid passwords (infozip, rar and
the 7-Zip on Windows do not create archives with empty passwords, for
example).

Calling Query::setResponse(false) when an empty password is passed
makes the code in CliInterface consider the current action has been
canceled, as if the user has pressed the Cancel button in the password
query dialog, and not pass a single newline in password queries.

Even though the related bug report can also be considered to be caused
by PasswordPromptPattern not being defined for the clizip plugin and
CliInterface::handleLine() not checking for password prompts in Copy
mode, this commit has the advantage that the user is not prompted twice
for zip files if she enters an empty password the first time.

The user should be informed that the action has been canceled, but
this can be done in a separate commit.

BUG: 291282
FIXED-IN: 4.8.1
parent 23b5cb64
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment