summaryrefslogtreecommitdiff
path: root/user/trojita/testfix.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-11-18 03:11:50 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-11-21 02:08:32 -0600
commit4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92 (patch)
treed7baad867fb90684d7d08e4221f363e72efd147f /user/trojita/testfix.patch
parent3ff4b8c8548f6b45f93367f2ea8d151844f43c8f (diff)
downloadpackages-4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92.tar.gz
packages-4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92.tar.bz2
packages-4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92.tar.xz
packages-4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92.zip
user/trojita: Fix build and add patches
* Ensures Trojitá does not crash using attachments. * Port to Qt 5.15. * Fix a security issue with STARTTLS. * Ensure passwords are stored correctly. * Fix signedness on unsigned char platforms (ARM, Power). Closes: #856
Diffstat (limited to 'user/trojita/testfix.patch')
-rw-r--r--user/trojita/testfix.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/user/trojita/testfix.patch b/user/trojita/testfix.patch
new file mode 100644
index 000000000..efe36d053
--- /dev/null
+++ b/user/trojita/testfix.patch
@@ -0,0 +1,85 @@
+Required for plaintext-upgrade-attack.patch to run successfully.
+
+From 91d19cb8530cb8df6ec0ee0580abcd98f1957395 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jkt@kde.org>
+Date: Mon, 5 Sep 2016 12:47:28 +0200
+Subject: [PATCH] tests: fix more memleaks
+
+There's some progress, but still plenty of stuff to do:
+
+-SUMMARY: AddressSanitizer: 77490 byte(s) leaked in 1010 allocation(s).
++SUMMARY: AddressSanitizer: 7720 byte(s) leaked in 95 allocation(s).
+
+Change-Id: I133fda902a9bd3f9fe697d7ffe8c57a159c887d8
+---
+ tests/Imap/test_Imap_Tasks_OpenConnection.cpp | 16 ++++++++--------
+ tests/Imap/test_Imap_Tasks_OpenConnection.h | 14 +++++++-------
+ 2 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/tests/Imap/test_Imap_Tasks_OpenConnection.cpp b/tests/Imap/test_Imap_Tasks_OpenConnection.cpp
+index b3a95636..c40297ab 100644
+--- a/tests/Imap/test_Imap_Tasks_OpenConnection.cpp
++++ b/tests/Imap/test_Imap_Tasks_OpenConnection.cpp
+@@ -35,12 +35,11 @@ void ImapModelOpenConnectionTest::initTestCase()
+ {
+ LibMailboxSync::initTestCase();
+ qRegisterMetaType<Imap::Mailbox::ImapTask*>();
+- completedSpy = 0;
+- m_enableAutoLogin = true;
+ }
+
+ void ImapModelOpenConnectionTest::init()
+ {
++ m_enableAutoLogin = true;
+ reinit(TlsRequired::No);
+ }
+
+@@ -56,13 +55,14 @@ void ImapModelOpenConnectionTest::reinit(const TlsRequired tlsRequired)
+ connect(model, &Imap::Mailbox::Model::needsSslDecision, this, &ImapModelOpenConnectionTest::acceptSsl, Qt::QueuedConnection);
+ LibMailboxSync::setModelNetworkPolicy(model, Imap::Mailbox::NETWORK_ONLINE);
+ QCoreApplication::processEvents();
++ delete task;
+ task = new Imap::Mailbox::OpenConnectionTask(model);
+- completedSpy = new QSignalSpy(task, SIGNAL(completed(Imap::Mailbox::ImapTask*)));
+- failedSpy = new QSignalSpy(task, SIGNAL(failed(QString)));
+- authSpy = new QSignalSpy(model, SIGNAL(authRequested()));
+- connErrorSpy = new QSignalSpy(model, SIGNAL(imapError(QString)));
+- startTlsUpgradeSpy = new QSignalSpy(model, SIGNAL(requireStartTlsInFuture()));
+- authErrorSpy = new QSignalSpy(model, SIGNAL(imapAuthErrorChanged(const QString&)));
++ completedSpy.reset(new QSignalSpy(task, SIGNAL(completed(Imap::Mailbox::ImapTask*))));
++ failedSpy.reset(new QSignalSpy(task, SIGNAL(failed(QString))));
++ authSpy.reset(new QSignalSpy(model, SIGNAL(authRequested())));
++ connErrorSpy.reset(new QSignalSpy(model, SIGNAL(imapError(QString))));
++ startTlsUpgradeSpy.reset(new QSignalSpy(model, SIGNAL(requireStartTlsInFuture())));
++ authErrorSpy.reset(new QSignalSpy(model, SIGNAL(imapAuthErrorChanged(const QString&))));
+ t.reset();
+ }
+
+diff --git a/tests/Imap/test_Imap_Tasks_OpenConnection.h b/tests/Imap/test_Imap_Tasks_OpenConnection.h
+index 30f531a2..4df65c05 100644
+--- a/tests/Imap/test_Imap_Tasks_OpenConnection.h
++++ b/tests/Imap/test_Imap_Tasks_OpenConnection.h
+@@ -78,13 +78,13 @@ protected:
+ void reinit(const TlsRequired tlsRequired = TlsRequired::No);
+
+ private:
+- Imap::Mailbox::OpenConnectionTask* task;
+- QSignalSpy* completedSpy;
+- QSignalSpy* failedSpy;
+- QSignalSpy* authSpy;
+- QSignalSpy *connErrorSpy;
+- QSignalSpy *startTlsUpgradeSpy;
+- QSignalSpy *authErrorSpy;
++ QPointer<Imap::Mailbox::OpenConnectionTask> task;
++ std::unique_ptr<QSignalSpy> completedSpy;
++ std::unique_ptr<QSignalSpy> failedSpy;
++ std::unique_ptr<QSignalSpy> authSpy;
++ std::unique_ptr<QSignalSpy> connErrorSpy;
++ std::unique_ptr<QSignalSpy> startTlsUpgradeSpy;
++ std::unique_ptr<QSignalSpy> authErrorSpy;
+
+ bool m_enableAutoLogin;
+ };
+--
+GitLab
+