diff options
| author | Simeon Simeonov | 2018-03-09 14:02:34 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2018-03-09 14:02:34 +0100 |
| commit | f1babd48f5259186cd1233288992f942d4b5b0bb (patch) | |
| tree | 54d740ef2201fceb3e54fac31272e80e65079ec7 /libsylph/news.c | |
| parent | 57944f6147f077ccf4d84b9d2659f4e8645e8858 (diff) | |
Complete rewrite of the master password implementation
Diffstat (limited to 'libsylph/news.c')
| -rw-r--r-- | libsylph/news.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libsylph/news.c b/libsylph/news.c index ffff9f9..b7a922a 100644 --- a/libsylph/news.c +++ b/libsylph/news.c | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | #include "utils.h" | 44 | #include "utils.h" |
| 45 | #include "prefs_common.h" | 45 | #include "prefs_common.h" |
| 46 | #include "prefs_account.h" | 46 | #include "prefs_account.h" |
| 47 | #include "masterpassword.h" | ||
| 47 | #if USE_SSL | 48 | #if USE_SSL |
| 48 | # include "ssl.h" | 49 | # include "ssl.h" |
| 49 | #endif | 50 | #endif |
| @@ -250,7 +251,11 @@ static Session *news_session_new_for_folder(Folder *folder) | |||
| 250 | if (ac->use_nntp_auth && ac->userid && ac->userid[0]) { | 251 | if (ac->use_nntp_auth && ac->userid && ac->userid[0]) { |
| 251 | userid = ac->userid; | 252 | userid = ac->userid; |
| 252 | if (ac->passwd && ac->passwd[0]) | 253 | if (ac->passwd && ac->passwd[0]) |
| 253 | passwd = g_strdup(ac->passwd); | 254 | if (master_password_active()) { |
| 255 | passwd = decrypt_with_master_password(ac->passwd); | ||
| 256 | } else { | ||
| 257 | passwd = g_strdup(ac->passwd); | ||
| 258 | } | ||
| 254 | else | 259 | else |
| 255 | passwd = input_query_password(ac->nntp_server, userid); | 260 | passwd = input_query_password(ac->nntp_server, userid); |
| 256 | } | 261 | } |
