From 306e4c042da3d51ad54367d0f9a9262d786765f8 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 13 Sep 2013 05:10:04 -0700 Subject: [PATCH] WebDAV: testing a WebDAV source depends on password lookup This becomes relevant once passwords are actually stored in a keyring. --- src/backends/webdav/WebDAVSourceRegister.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/backends/webdav/WebDAVSourceRegister.cpp b/src/backends/webdav/WebDAVSourceRegister.cpp index a7b481da..e6554cc9 100644 --- a/src/backends/webdav/WebDAVSourceRegister.cpp +++ b/src/backends/webdav/WebDAVSourceRegister.cpp @@ -7,6 +7,8 @@ #include "CalDAVVxxSource.h" #include "CardDAVSource.h" #include +#include +#include #ifdef ENABLE_UNIT_TESTS #include "test.h" #endif @@ -16,6 +18,7 @@ #include #include +#include #include SE_BEGIN_CXX @@ -297,6 +300,12 @@ public: // same settings. std::string peerName = std::string(server ? server : "no-such-server") + "_" + clientID; boost::shared_ptr peer(new SyncConfig(peerName)); + // Resolve credentials. + SimpleUserInterface ui(peer->getKeyring()); + PasswordConfigProperty::checkPasswords(ui, + *peer, + PasswordConfigProperty::CHECK_PASSWORD_ALL, + boost::assign::list_of(name)); SyncSourceNodes peerNodes = peer->getSyncSourceNodes(name); SE_LOG_DEBUG(NULL, "overriding testing source %s properties with the ones from config %s = %s", name.c_str(),