diff --git a/ChangeLog b/ChangeLog index b28a925b5..f55bfb325 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-12-02 [wwp] 1.9.100cvs52 + + * src/compose.c + * src/prefs_template.c + * src/quote_fmt.h + * src/quote_fmt_parse.y + prevent from executing |p and |p templates commands when + adding or replacing templates in prefs (avoids annoying and + potentially dangerous behaviours) + 2005-12-02 [paul] 1.9.100cvs51 * src/prefs_common.c diff --git a/PATCHSETS b/PATCHSETS index 440091e78..e3c8cf55a 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1035,3 +1035,4 @@ ( cvs diff -u -r 1.105.2.42 -r 1.105.2.43 src/prefs_account.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/prefs_compose_writing.c; cvs diff -u -r 1.4.2.13 -r 1.4.2.14 src/prefs_fonts.c; cvs diff -u -r 1.5.2.4 -r 1.5.2.5 src/prefs_gtk.h; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/prefs_image_viewer.c; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/prefs_message.c; cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/prefs_other.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/prefs_receive.c; cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/prefs_send.c; cvs diff -u -r 1.5.2.14 -r 1.5.2.15 src/prefs_spelling.c; cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/prefs_summaries.c; cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/prefs_wrapping.c; cvs diff -u -r 1.5.2.7 -r 1.5.2.8 src/plugins/dillo_viewer/dillo_prefs.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/pgpcore/prefs_gpg.c; ) > 1.9.100cvs49.patchset ( cvs diff -u -r 1.65.2.43 -r 1.65.2.44 src/codeconv.c; cvs diff -u -r 1.15.2.13 -r 1.15.2.14 src/codeconv.h; cvs diff -u -r 1.204.2.68 -r 1.204.2.69 src/prefs_common.c; cvs diff -u -r 1.103.2.36 -r 1.103.2.37 src/prefs_common.h; cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/prefs_message.c; cvs diff -u -r 1.96.2.86 -r 1.96.2.87 src/textview.c; cvs diff -u -r 1.4.2.25 -r 1.4.2.26 src/gtk/about.c; ) > 1.9.100cvs50.patchset ( cvs diff -u -r 1.204.2.69 -r 1.204.2.70 src/prefs_common.c; ) > 1.9.100cvs51.patchset +( cvs diff -u -r 1.382.2.198 -r 1.382.2.199 src/compose.c; cvs diff -u -r 1.12.2.17 -r 1.12.2.18 src/prefs_template.c; cvs diff -u -r 1.5.12.2 -r 1.5.12.3 src/quote_fmt.h; cvs diff -u -r 1.22.2.14 -r 1.22.2.15 src/quote_fmt_parse.y; ) > 1.9.100cvs52.patchset diff --git a/configure.ac b/configure.ac index 654838073..2cbe6e180 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=100 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=51 +EXTRA_VERSION=52 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/compose.c b/src/compose.c index 5b210eeda..3e9c1622d 100644 --- a/src/compose.c +++ b/src/compose.c @@ -2114,7 +2114,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo, msginfo = &dummyinfo; if (qmark != NULL) { - quote_fmt_init(msginfo, NULL, NULL); + quote_fmt_init(msginfo, NULL, NULL, FALSE); quote_fmt_scan_string(qmark); quote_fmt_parse(); @@ -2130,7 +2130,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo, && trimmed_body[0]=='\n') *trimmed_body++; - quote_fmt_init(msginfo, quote_str, trimmed_body); + quote_fmt_init(msginfo, quote_str, trimmed_body, FALSE); quote_fmt_scan_string(fmt); quote_fmt_parse(); diff --git a/src/prefs_template.c b/src/prefs_template.c index 614cfce96..22099ff46 100644 --- a/src/prefs_template.c +++ b/src/prefs_template.c @@ -498,7 +498,7 @@ static gboolean prefs_template_list_view_set_row(GtkTreeIter *row) MsgInfo dummyinfo; memset(&dummyinfo, 0, sizeof(MsgInfo)); - quote_fmt_init(&dummyinfo, NULL, NULL); + quote_fmt_init(&dummyinfo, NULL, NULL, TRUE); quote_fmt_scan_string(value); quote_fmt_parse(); parsed_buf = quote_fmt_get_buffer(); diff --git a/src/quote_fmt.h b/src/quote_fmt.h index 17e3957a1..3fa656082 100644 --- a/src/quote_fmt.h +++ b/src/quote_fmt.h @@ -8,7 +8,7 @@ void quote_fmt_quote_description(void); gchar *quote_fmt_get_buffer(void); void quote_fmt_init(MsgInfo *info, const gchar *my_quote_str, - const gchar *my_body); + const gchar *my_body, gboolean *my_dry_run); gint quote_fmtparse(void); void quote_fmt_scan_string(const gchar *str); diff --git a/src/quote_fmt_parse.y b/src/quote_fmt_parse.y index e7938691e..18e5f67ec 100644 --- a/src/quote_fmt_parse.y +++ b/src/quote_fmt_parse.y @@ -42,6 +42,7 @@ int yylex(void); static MsgInfo *msginfo = NULL; static gboolean *visible = NULL; +static gboolean *dry_run = NULL; static gint maxsize = 0; static gint stacksize = 0; @@ -116,11 +117,12 @@ gint quote_fmt_get_cursor_pos(void) } void quote_fmt_init(MsgInfo *info, const gchar *my_quote_str, - const gchar *my_body) + const gchar *my_body, gboolean* my_dry_run) { quote_str = my_quote_str; body = my_body; msginfo = info; + dry_run = my_dry_run; stacksize = 0; add_visibility(TRUE); if (buffer != NULL) @@ -647,9 +649,13 @@ query: insert: INSERT_FILE OPARENT string CPARENT { - quote_fmt_insert_file($3); + if (!dry_run) { + quote_fmt_insert_file($3); + } } | INSERT_PROGRAMOUTPUT OPARENT string CPARENT { - quote_fmt_insert_program_output($3); + if (!dry_run) { + quote_fmt_insert_program_output($3); + } };