diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-18 11:40:41 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-18 11:40:45 +0200 |
commit | a7e7f7fdd2a9d38921476d57f305c9cd4459a556 (patch) | |
tree | d9ad3bdc3e275004a54f508025f0d52227ab18cb /examples/imapresource/imapserverproxy.cpp | |
parent | ea2e02ad656640c17d520b5a22c168c3c1faef56 (diff) | |
download | sink-a7e7f7fdd2a9d38921476d57f305c9cd4459a556.tar.gz sink-a7e7f7fdd2a9d38921476d57f305c9cd4459a556.zip |
Avoid storing the password in the configuration
The password (or any other secret), is now cached in the client process
(in-memory only), and delivered to the resource via command.
The resource avoids doing any operations against the source until the
secret is available.
Diffstat (limited to 'examples/imapresource/imapserverproxy.cpp')
-rw-r--r-- | examples/imapresource/imapserverproxy.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/imapresource/imapserverproxy.cpp b/examples/imapresource/imapserverproxy.cpp index 16887b1..317fbdc 100644 --- a/examples/imapresource/imapserverproxy.cpp +++ b/examples/imapresource/imapserverproxy.cpp | |||
@@ -139,6 +139,9 @@ ImapServerProxy::ImapServerProxy(const QString &serverUrl, int port, SessionCach | |||
139 | 139 | ||
140 | KAsync::Job<void> ImapServerProxy::login(const QString &username, const QString &password) | 140 | KAsync::Job<void> ImapServerProxy::login(const QString &username, const QString &password) |
141 | { | 141 | { |
142 | if (password.isEmpty()) { | ||
143 | return KAsync::error(Imap::MissingCredentialsError); | ||
144 | } | ||
142 | if (mSessionCache) { | 145 | if (mSessionCache) { |
143 | auto session = mSessionCache->getSession(); | 146 | auto session = mSessionCache->getSession(); |
144 | if (session.isValid()) { | 147 | if (session.isValid()) { |