diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2006-11-27 02:30:29 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-11-27 02:30:29 +0800 |
commit | 0a7017c1a673ec61479db348d7ff7452b19f664e (patch) | |
tree | c5f84ec17098333fb9498ae98a70b3832c2a5f1e /mail/em-mailer-prefs.c | |
parent | d8b4b86497a9b95433b2fe967d3bec62cd6bc69c (diff) | |
download | gsoc2013-evolution-0a7017c1a673ec61479db348d7ff7452b19f664e.tar.gz gsoc2013-evolution-0a7017c1a673ec61479db348d7ff7452b19f664e.tar.zst gsoc2013-evolution-0a7017c1a673ec61479db348d7ff7452b19f664e.zip |
Fix for bug #337439 DoS attach with large emails
2006-11-26 Srinivasa Ragavan <sragavan@novell.com>
* Fix for bug #337439 DoS attach with large emails
svn path=/trunk/; revision=33024
Diffstat (limited to 'mail/em-mailer-prefs.c')
-rw-r--r-- | mail/em-mailer-prefs.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index d665ba4913..4b944fccb6 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -459,6 +459,16 @@ address_compress_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) } static void +mlimit_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) +{ + int count; + + count = (int) gtk_spin_button_get_value (prefs->mlimit_count); + + gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/message_text_part_limit", count, NULL); +} + +static void spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, float div, GCallback value_changed) { GError *err = NULL; @@ -772,6 +782,16 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) "/apps/evolution/mail/display/mark_seen_timeout", 1000.0, G_CALLBACK (mark_seen_timeout_changed)); + prefs->mlimit_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "mlimit_checkbutton")); + toggle_button_init (prefs, prefs->mlimit_toggle, FALSE, + "/apps/evolution/mail/display/force_message_limit", + G_CALLBACK (toggle_button_toggled)); + + prefs->mlimit_count = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "mlimit_spin")); + spin_button_init (prefs, prefs->mlimit_count, + "/apps/evolution/mail/display/message_text_part_limit", + 1, G_CALLBACK (mlimit_count_changed)); + prefs->address_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "address_checkbox")); toggle_button_init (prefs, prefs->address_toggle, FALSE, "/apps/evolution/mail/display/address_compress", |