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 /common/genericresource.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 'common/genericresource.cpp')
-rw-r--r-- | common/genericresource.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/genericresource.cpp b/common/genericresource.cpp index 7178b3d..b6a8f62 100644 --- a/common/genericresource.cpp +++ b/common/genericresource.cpp | |||
@@ -45,6 +45,13 @@ GenericResource::~GenericResource() | |||
45 | { | 45 | { |
46 | } | 46 | } |
47 | 47 | ||
48 | void GenericResource::setSecret(const QString &s) | ||
49 | { | ||
50 | if (mSynchronizer) { | ||
51 | mSynchronizer->setSecret(s); | ||
52 | } | ||
53 | } | ||
54 | |||
48 | void GenericResource::setupPreprocessors(const QByteArray &type, const QVector<Sink::Preprocessor *> &preprocessors) | 55 | void GenericResource::setupPreprocessors(const QByteArray &type, const QVector<Sink::Preprocessor *> &preprocessors) |
49 | { | 56 | { |
50 | mPipeline->setPreprocessors(type, preprocessors); | 57 | mPipeline->setPreprocessors(type, preprocessors); |