#include "common/claws.h"
#include "common/version.h"
#include "main.h"
+#include "password.h"
#include "plugin.h"
#include "prefs_common.h"
#include "utils.h"
switch(intf->type) {
case INTF_HTTP_AUTH:
if (spamreport_prefs.user[id] && *(spamreport_prefs.user[id])) {
- auth = g_strdup_printf("%s:%s", spamreport_prefs.user[id], spamreport_prefs.pass[id]);
+ gchar *pass = password_decrypt(spamreport_prefs.pass[id], NULL);
+ auth = g_strdup_printf("%s:%s", spamreport_prefs.user[id], (pass != NULL ? pass : ""));
+ if (pass != NULL) {
+ memset(pass, 0, strlen(pass));
+ }
+ g_free(pass);
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, intf->url);
#include <gtk/gtk.h>
#include "gtkutils.h"
+#include "password.h"
#include "prefs.h"
#include "prefs_gtk.h"
#include "prefswindow.h"
gtk_widget_show(vbox);
for (i = 0; i < INTF_LAST; i++) {
+ gchar *pass;
prefs_page->frame[i] = gtk_frame_new(spam_interfaces[i].name);
gtk_box_pack_start(GTK_BOX(vbox), prefs_page->frame[i], FALSE, FALSE, 6);
gtk_entry_set_text(GTK_ENTRY(prefs_page->user_entry[i]),
spamreport_prefs.user[i] ? spamreport_prefs.user[i]:"");
- gtk_entry_set_text(GTK_ENTRY(prefs_page->pass_entry[i]),
- spamreport_prefs.pass[i] ? spamreport_prefs.pass[i]:"");
+
+ pass = password_decrypt(spamreport_prefs.pass[i], NULL);
+ gtk_entry_set_text(GTK_ENTRY(prefs_page->pass_entry[i]), pass ? pass:"");
+ if (pass != NULL) {
+ memset(pass, 0, strlen(pass));
+ }
+ g_free(pass);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(prefs_page->enabled_chkbtn[i]),
spamreport_prefs.enabled[i]);