mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Fixed bug with $attachments substitution on shell command
SVN revision: 1223
This commit is contained in:
parent
edf73c1c17
commit
d22817fc0e
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.570 2005/02/22 08:55:20 ritt
|
||||||
|
Fixed bug with $attachments substitution on shell command
|
||||||
|
|
||||||
Revision 1.569 2005/02/22 08:15:19 ritt
|
Revision 1.569 2005/02/22 08:15:19 ritt
|
||||||
Applied patch from Emiliano Gabrielli to use chkext()
|
Applied patch from Emiliano Gabrielli to use chkext()
|
||||||
|
|
||||||
@ -16531,6 +16534,7 @@ int execute_shell(LOGBOOK * lbs, int message_id, char attrib[MAX_N_ATTR][NAME_LE
|
|||||||
/* substitute attachments */
|
/* substitute attachments */
|
||||||
p = stristr(shell_cmd, "$attachments");
|
p = stristr(shell_cmd, "$attachments");
|
||||||
strlcpy(tail, p + strlen("$attachments"), sizeof(tail));
|
strlcpy(tail, p + strlen("$attachments"), sizeof(tail));
|
||||||
|
*p = 0;
|
||||||
for (i=0 ; i<MAX_ATTACHMENTS ; i++)
|
for (i=0 ; i<MAX_ATTACHMENTS ; i++)
|
||||||
if (att_file[i][0] &&
|
if (att_file[i][0] &&
|
||||||
strlen(shell_cmd)+strlen(lbs->data_dir)+strlen(att_file[i]) < sizeof(shell_cmd)+1) {
|
strlen(shell_cmd)+strlen(lbs->data_dir)+strlen(att_file[i]) < sizeof(shell_cmd)+1) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user