Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kdepim-runtime for openSUSE:Factory checked in at 2021-12-13 20:41:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdepim-runtime (Old) and /work/SRC/openSUSE:Factory/.kdepim-runtime.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdepim-runtime" Mon Dec 13 20:41:35 2021 rev:86 rq:940070 version:21.12.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kdepim-runtime/kdepim-runtime.changes 2021-11-06 18:15:16.896799110 +0100 +++ /work/SRC/openSUSE:Factory/.kdepim-runtime.new.2520/kdepim-runtime.changes 2021-12-13 20:45:40.660494496 +0100 @@ -1,0 +2,35 @@ +Sun Dec 12 11:52:20 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Add upstream change to fix pop3 connections: + * 0001-POP3-Fix-SSL-connections.patch (kde#446751) + +------------------------------------------------------------------- +Fri Dec 3 19:21:53 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 21.12.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/gear/21.12.0/ +- Changes since 21.11.90: + * Enable new GitLab CI on stable branch. + +------------------------------------------------------------------- +Sat Nov 27 10:10:47 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 21.11.90 + * New feature release +- Changes since 21.11.80: + * Fix POP3 setup wizard defaults to unencrypted connections. (kde#423426) + * const'ify pointer + +------------------------------------------------------------------- +Sat Nov 13 17:55:00 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 21.11.80 + * New feature release +- Too many changes since 21.08.3, only listing bugfixes: + * Fix 444985: Wrong ports in akonadi_pop3_resource.pot (kde#444985) + * BUG 442884: Fix DSN support (kde#442884) + * fix UI elements being used before initialization (kde#439991) + +------------------------------------------------------------------- Old: ---- kdepim-runtime-21.08.3.tar.xz kdepim-runtime-21.08.3.tar.xz.sig New: ---- 0001-POP3-Fix-SSL-connections.patch kdepim-runtime-21.12.0.tar.xz kdepim-runtime-21.12.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdepim-runtime.spec ++++++ --- /var/tmp/diff_new_pack.RdPJnI/_old 2021-12-13 20:45:41.424494589 +0100 +++ /var/tmp/diff_new_pack.RdPJnI/_new 2021-12-13 20:45:41.452494593 +0100 @@ -21,7 +21,7 @@ %{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')} %bcond_without lang Name: kdepim-runtime -Version: 21.08.3 +Version: 21.12.0 Release: 0 Summary: Akonadi resources for PIM applications License: GPL-2.0-or-later AND GPL-3.0-or-later @@ -32,6 +32,8 @@ Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig Source2: applications.keyring %endif +# PATCH-FIX-UPSTREAM +Patch0: 0001-POP3-Fix-SSL-connections.patch BuildRequires: cyrus-sasl-devel BuildRequires: extra-cmake-modules BuildRequires: kf5-filesystem ++++++ 0001-POP3-Fix-SSL-connections.patch ++++++ >From f14fabcefb45790175e209ef8ae394def4a805e9 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid <[email protected]> Date: Fri, 10 Dec 2021 21:55:13 +0100 Subject: [PATCH] POP3: Fix SSL connections We need to go into ssl before trying to read from the socket, otherwise nothing works BUGS: 446751 --- resources/pop3/pop3protocol.cpp | 72 ++++++++++++++++++++------------- resources/pop3/pop3protocol.h | 2 + 2 files changed, 45 insertions(+), 29 deletions(-) diff --git a/resources/pop3/pop3protocol.cpp b/resources/pop3/pop3protocol.cpp index c2d01d33a..15971919e 100644 --- a/resources/pop3/pop3protocol.cpp +++ b/resources/pop3/pop3protocol.cpp @@ -535,6 +535,39 @@ Result POP3Protocol::loginPASS() return Result::pass(); } +Result POP3Protocol::startSsl() +{ + mSocket->ignoreSslErrors(); // Don't worry, errors are handled manually below + mSocket->startClientEncryption(); + const bool encryptionStarted = mSocket->waitForEncrypted(s_connectTimeout); + + const QSslCipher cipher = mSocket->sessionCipher(); + const QList<QSslError> errors = mSocket->sslHandshakeErrors(); + if (!encryptionStarted || !errors.isEmpty() || !mSocket->isEncrypted() || cipher.isNull() || cipher.usedBits() == 0) { + QString errorString = std::accumulate(errors.begin(), errors.end(), QString(), [](QString cur, const QSslError &error) { + if (!cur.isEmpty()) + cur += QLatin1Char('\n'); + cur += error.errorString(); + return cur; + }); + + qCDebug(POP3_LOG) << "Initial SSL handshake failed. cipher.isNull() is" << cipher.isNull() << ", cipher.usedBits() is" << cipher.usedBits() + << ", the socket says:" << mSocket->errorString() << "and the SSL errors are:" << errorString; + mContinueAfterSslError = false; + Q_EMIT sslError(KSslErrorUiData(mSocket)); + if (!mContinueAfterSslError) { + if (errorString.isEmpty()) + errorString = mSocket->errorString(); + qCDebug(POP3_LOG) << "TLS setup has failed. Aborting." << errorString; + closeConnection(); + return Result::fail(ERR_SSL_FAILURE, i18n("SSL/TLS error: %1", errorString)); + } + } else { + qCDebug(POP3_LOG) << "TLS has been enabled."; + } + return Result::pass(); +} + Result POP3Protocol::openConnection() { m_try_apop = mSettings.authenticationMethod() == MailTransport::Transport::EnumAuthenticationType::APOP; @@ -560,6 +593,13 @@ Result POP3Protocol::openConnection() return Result::fail(mSocket->error(), errorString); } + if (mSettings.useSSL()) { + const Result res = startSsl(); + if (!res.success) { + return res; + } + } + mConnected = true; greeting_buf = new char[GREETING_BUF_LEN]; @@ -608,35 +648,9 @@ Result POP3Protocol::openConnection() "was unsuccessful.\nYou can " "disable TLS in the POP account settings dialog.")); } - } - if (mSettings.useSSL() || mSettings.useTLS()) { - mSocket->ignoreSslErrors(); // Don't worry, errors are handled manually below - mSocket->startClientEncryption(); - const bool encryptionStarted = mSocket->waitForEncrypted(s_connectTimeout); - - const QSslCipher cipher = mSocket->sessionCipher(); - const QList<QSslError> errors = mSocket->sslHandshakeErrors(); - if (!encryptionStarted || !errors.isEmpty() || !mSocket->isEncrypted() || cipher.isNull() || cipher.usedBits() == 0) { - QString errorString = std::accumulate(errors.begin(), errors.end(), QString(), [](QString cur, const QSslError &error) { - if (!cur.isEmpty()) - cur += QLatin1Char('\n'); - cur += error.errorString(); - return cur; - }); - - qCDebug(POP3_LOG) << "Initial SSL handshake failed. cipher.isNull() is" << cipher.isNull() << ", cipher.usedBits() is" << cipher.usedBits() - << ", the socket says:" << mSocket->errorString() << "and the SSL errors are:" << errorString; - mContinueAfterSslError = false; - Q_EMIT sslError(KSslErrorUiData(mSocket)); - if (!mContinueAfterSslError) { - if (errorString.isEmpty()) - errorString = mSocket->errorString(); - qCDebug(POP3_LOG) << "TLS setup has failed. Aborting." << errorString; - closeConnection(); - return Result::fail(ERR_SSL_FAILURE, i18n("SSL/TLS error: %1", errorString)); - } - } else { - qCDebug(POP3_LOG) << "TLS has been enabled."; + const Result res = startSsl(); + if (!res.success) { + return res; } } diff --git a/resources/pop3/pop3protocol.h b/resources/pop3/pop3protocol.h index 9b40b334f..d01f7ab7a 100644 --- a/resources/pop3/pop3protocol.h +++ b/resources/pop3/pop3protocol.h @@ -127,6 +127,8 @@ private: */ Q_REQUIRED_RESULT Result loginPASS(); + Q_REQUIRED_RESULT Result startSsl(); + const Settings &mSettings; QSslSocket *const mSocket; unsigned short int m_iPort; -- 2.34.1 ++++++ kdepim-runtime-21.08.3.tar.xz -> kdepim-runtime-21.12.0.tar.xz ++++++ ++++ 206366 lines of diff (skipped)
