From c94746703a3e0b59372b3bbf9355112c6a85d2dc Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Wed, 14 Mar 2018 12:18:31 +0100 Subject: Implement master password encrypted string tags --- libsylph/news.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'libsylph/news.c') diff --git a/libsylph/news.c b/libsylph/news.c index b7a922a..e75976e 100644 --- a/libsylph/news.c +++ b/libsylph/news.c @@ -250,14 +250,12 @@ static Session *news_session_new_for_folder(Folder *folder) ac = folder->account; if (ac->use_nntp_auth && ac->userid && ac->userid[0]) { userid = ac->userid; - if (ac->passwd && ac->passwd[0]) - if (master_password_active()) { - passwd = decrypt_with_master_password(ac->passwd); - } else { - passwd = g_strdup(ac->passwd); - } - else + if (ac->passwd && ac->passwd[0]) { + /* TODO: check if format is correct */ + passwd = decrypt_with_master_password(ac->passwd); + } else { passwd = input_query_password(ac->nntp_server, userid); + } } if (ac->use_socks && ac->use_socks_for_recv && ac->proxy_host) { -- cgit v1.3