Commit c98f8429 authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈 Committed by Nate Graham
Browse files

make sure to create the wallet folder before using it

otherwise the default "" folder is used and we'll get confused
contexts where the write would write into "" but we'd read from
formdata. simply always ensure the folder gets created first

BUG: 446925


(cherry picked from commit 79df7ec5)
parent c8ade88e
Pipeline #141128 passed with stage
in 2 minutes and 43 seconds
/*******************************************************************
* reportassistantpages_bugzilla.cpp
* SPDX-FileCopyrightText: 2009, 2010, 2011 Dario Andres Rodriguez <andresbajotierra@gmail.com>
* SPDX-FileCopyrightText: 2019-2021 Harald Sitter <sitter@kde.org>
* SPDX-FileCopyrightText: 2019-2022 Harald Sitter <sitter@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
......@@ -198,6 +198,7 @@ void BugzillaLoginPage::walletLogin()
ui.m_savePasswordCheckBox->setCheckState(Qt::Checked);
// Was the wallet opened?
if (m_wallet) {
m_wallet->createFolder(KWallet::Wallet::FormDataFolder());
m_wallet->setFolder(KWallet::Wallet::FormDataFolder());
// Use wallet data to try login
......@@ -216,6 +217,7 @@ void BugzillaLoginPage::walletLogin()
// If the DrKonqi entry is empty, but a Konqueror entry exists, use and copy it.
openWallet();
if (m_wallet) {
m_wallet->createFolder(KWallet::Wallet::FormDataFolder());
m_wallet->setFolder(KWallet::Wallet::FormDataFolder());
// Fetch Konqueror data
......@@ -262,6 +264,7 @@ void BugzillaLoginPage::loginClicked()
qCDebug(DRKONQI_LOG) << "Wallet opened?" << m_wallet;
// Got wallet open ?
if (m_wallet) {
m_wallet->createFolder(KWallet::Wallet::FormDataFolder());
m_wallet->setFolder(KWallet::Wallet::FormDataFolder());
QMap<QString, QString> values;
......@@ -276,6 +279,7 @@ void BugzillaLoginPage::loginClicked()
}
// Got wallet open ?
if (m_wallet) {
m_wallet->createFolder(KWallet::Wallet::FormDataFolder());
m_wallet->setFolder(KWallet::Wallet::FormDataFolder());
m_wallet->removeEntry(m_walletEntryName);
}
......
Supports Markdown
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