Commit 38ef30f4 authored by Tobias Hunger's avatar Tobias Hunger

VcsOutputWindow: Try harder to filter out password data

Not perfect, but might catch some more passwords before they are
echoed in cleartext.

Change-Id: I61e537a4a3cbc69748e1f761a5a08fe03ff2552d
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent b86aea44
......@@ -441,9 +441,13 @@ static inline QString formatArguments(const QStringList &args)
const int size = args.size();
// Skip authentication options
for (int i = 0; i < size; i++) {
const QString &arg = args.at(i);
const QString arg = filterPasswordFromUrls(args.at(i));
if (i)
str << ' ';
if (arg.startsWith(QString::fromLatin1(passwordOptionC) + QLatin1Char('='))) {
str << "--password=********";
continue;
}
str << arg;
if (arg == QLatin1String(passwordOptionC)) {
str << " ********";
......
Markdown is supported
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