mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Remove any CR/LF from attributes submitted from browser
SVN revision: 1181
This commit is contained in:
parent
0b127f7c8b
commit
cef5b35c47
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.543 2005/01/21 22:51:25 ritt
|
||||||
|
Remove any CR/LF from attributes submitted from browser
|
||||||
|
|
||||||
Revision 1.542 2005/01/21 22:21:24 ritt
|
Revision 1.542 2005/01/21 22:21:24 ritt
|
||||||
Fixed compiler warning
|
Fixed compiler warning
|
||||||
|
|
||||||
@ -16718,6 +16721,12 @@ void submit_elog(LOGBOOK * lbs)
|
|||||||
} else {
|
} else {
|
||||||
strlcpy(attrib[i], getparam(ua), NAME_LENGTH);
|
strlcpy(attrib[i], getparam(ua), NAME_LENGTH);
|
||||||
|
|
||||||
|
/* remove any CR/LF */
|
||||||
|
if (strchr(attrib[i], '\r'))
|
||||||
|
*strchr(attrib[i], '\r') = 0;
|
||||||
|
if (strchr(attrib[i], '\n'))
|
||||||
|
*strchr(attrib[i], '\n') = 0;
|
||||||
|
|
||||||
/* strip trailing "{...}" */
|
/* strip trailing "{...}" */
|
||||||
if (is_cond_attr(i) && strchr(attrib[i], '{') && strchr(attrib[i], '}'))
|
if (is_cond_attr(i) && strchr(attrib[i], '{') && strchr(attrib[i], '}'))
|
||||||
*strchr(attrib[i], '{') = 0;
|
*strchr(attrib[i], '{') = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user