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)
This commit is contained in:
Tristan Chabredier 2005-12-02 14:08:12 +00:00
parent 01fef48e4e
commit 85e4cd0924
7 changed files with 25 additions and 8 deletions

View file

@ -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

View file

@ -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

View file

@ -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=

View file

@ -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();

View file

@ -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();

View file

@ -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);

View file

@ -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);
}
};