Hello community, here is the log from the commit of package falkon for openSUSE:Factory checked in at 2020-01-28 10:57:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/falkon (Old) and /work/SRC/openSUSE:Factory/.falkon.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "falkon" Tue Jan 28 10:57:22 2020 rev:7 rq:767910 version:3.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/falkon/falkon.changes 2019-12-28 13:40:47.498941226 +0100 +++ /work/SRC/openSUSE:Factory/.falkon.new.26092/falkon.changes 2020-01-28 10:57:26.089131999 +0100 @@ -1,0 +2,7 @@ +Sat Jan 25 12:53:28 UTC 2020 - Wolfgang Bauer <[email protected]> + +- Add Fix-crash-when-KWallet-is-not-available.patch to fix crashes + with the KDE plugin if kwallet is disabled or cannot be opened + for some reason (kde#398767) + +------------------------------------------------------------------- New: ---- Fix-crash-when-KWallet-is-not-available.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ falkon.spec ++++++ --- /var/tmp/diff_new_pack.BwooB2/_old 2020-01-28 10:57:27.045132706 +0100 +++ /var/tmp/diff_new_pack.BwooB2/_new 2020-01-28 10:57:27.049132708 +0100 @@ -32,6 +32,8 @@ Source3: opensusesoftware.png # PATCH-FIX-UPSTREAM Patch0: Add-missing-include-in-last-qt5.14.patch +# PATCH-FIX-UPSTREAM +Patch1: Fix-crash-when-KWallet-is-not-available.patch BuildRequires: cmake(KF5Crash) >= 5.54.0 BuildRequires: cmake(KF5CoreAddons) >= 5.54.0 BuildRequires: cmake(KF5KIO) >= 5.54.0 ++++++ Fix-crash-when-KWallet-is-not-available.patch ++++++ >From 1cecd14fd069ff778224fe778b7117cb4e3bc0ee Mon Sep 17 00:00:00 2001 From: Puneeth Chanda <[email protected]> Date: Fri, 24 Jan 2020 14:10:03 +0100 Subject: Fix crash when KWallet is not available. Summary: Bug 398767 Currently, when the user clicks //remember password// when KWallet is disabled, **falkon** gets crashed. This patch fixes the crash by checking if `KWallet` object is created and only then it adds to the folder. The following functions are fixed: - addEntry - Update Entry - updateLastUsed - removeEntry - removeAll Reviewers: SGOrava, drosca Reviewed By: SGOrava, drosca Subscribers: drosca, falkon Tags: #falkon Differential Revision: https://phabricator.kde.org/D26872 --- .../kwalletpasswordbackend.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp b/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp index c9d0cb3..6b430af 100644 --- a/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp +++ b/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp @@ -82,6 +82,10 @@ void KWalletPasswordBackend::addEntry(const PasswordEntry &entry) { initialize(); + if (!m_wallet) { + return; + } + PasswordEntry stored = entry; stored.id = QString("%1/%2").arg(entry.host, entry.username); stored.updated = QDateTime::currentDateTime().toTime_t(); @@ -94,6 +98,10 @@ bool KWalletPasswordBackend::updateEntry(const PasswordEntry &entry) { initialize(); + if (!m_wallet) { + return false; + } + m_wallet->removeEntry(entry.id.toString()); m_wallet->writeEntry(entry.id.toString(), encodeEntry(entry)); @@ -110,6 +118,10 @@ void KWalletPasswordBackend::updateLastUsed(PasswordEntry &entry) { initialize(); + if (!m_wallet) { + return; + } + m_wallet->removeEntry(entry.id.toString()); entry.updated = QDateTime::currentDateTime().toTime_t(); @@ -127,6 +139,10 @@ void KWalletPasswordBackend::removeEntry(const PasswordEntry &entry) { initialize(); + if (!m_wallet) { + return; + } + m_wallet->removeEntry(entry.id.toString()); int index = m_allEntries.indexOf(entry); @@ -140,6 +156,10 @@ void KWalletPasswordBackend::removeAll() { initialize(); + if (!m_wallet) { + return; + } + m_allEntries.clear(); m_wallet->removeFolder("Falkon"); -- cgit v1.1
