summaryrefslogtreecommitdiff
path: root/pico/composer.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2013-05-31 17:08:22 -0600
committerEduardo Chappa <chappa@washington.edu>2013-05-31 17:08:22 -0600
commit81e994d7907f850506ddc248f84761a54995e58c (patch)
tree3bc4993b48ddeec45dee51323437200ab975887c /pico/composer.c
parent077522d7e058133f9de99d0d74481566b21c5a98 (diff)
downloadalpine-81e994d7907f850506ddc248f84761a54995e58c.tar.xz
* Fix not allow remote execution by adding PIPE_NOSHELL to the opening of a url by
a browser.
Diffstat (limited to 'pico/composer.c')
-rw-r--r--pico/composer.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/pico/composer.c b/pico/composer.c
index c801d385..e709cd67 100644
--- a/pico/composer.c
+++ b/pico/composer.c
@@ -1872,6 +1872,8 @@ AppendAttachment(char *fn, char *sz, char *cmt)
}
UpdateHeader(0);
+ if(sendnow)
+ return(status !=0);
PaintHeader(COMPOSER_TOP_LINE, status != 0);
PaintBody(1);
return(status != 0);
@@ -2015,7 +2017,7 @@ LineEdit(int allowedit, UCS *lastch)
tbufp = &strng[ods.p_len];
if(VALID_KEY(ch)){ /* char input */
- /*
+insert_char:/*
* if we are allowing editing, insert the new char
* end up leaving tbufp pointing to newly
* inserted character in string, and offset to the
@@ -2095,6 +2097,13 @@ LineEdit(int allowedit, UCS *lastch)
}
else { /* interpret ch as a command */
switch (ch = normalize_cmd(ch, ckm, 2)) {
+ case (CTRL|'\\') :
+ if (ch = GetAccent())
+ goto insert_char;
+ else
+ clearcursor();
+ break;
+
case (CTRL|KEY_LEFT): /* word skip left */
if(ods.p_ind > 0) /* Scoot one char left if possible */
ods.p_ind--;
@@ -3362,6 +3371,9 @@ display_delimiter(int state)
{
UCS *bufp, *buf;
+ if (sendnow)
+ return;
+
if(ComposerTopLine - 1 >= BOTTOM()) /* silently forget it */
return;
@@ -3418,6 +3430,9 @@ InvertPrompt(int entry, int state)
UCS *end;
int i;
+ if (sendnow)
+ return(TRUE);
+
buf = utf8_to_ucs4_cpystr(headents[entry].prompt); /* fresh prompt paint */
if(!buf)
return(-1);
@@ -4373,6 +4388,9 @@ is_blank(int row, int col, int n)
void
ShowPrompt(void)
{
+ if (sendnow)
+ return;
+
if(headents[ods.cur_e].key_label){
menu_header[TO_KEY].name = "^T";
menu_header[TO_KEY].label = headents[ods.cur_e].key_label;