mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed invalid "mode" parameter
This commit is contained in:
parent
9adae9b632
commit
e70bd68d9f
@ -20130,7 +20130,6 @@ void show_elog_list(LOGBOOK *lbs, int past_n, int last_n, int page_n, BOOL defau
|
|||||||
/* supersede mode from direct parameter */
|
/* supersede mode from direct parameter */
|
||||||
if (isparam("mode"))
|
if (isparam("mode"))
|
||||||
strlcpy(mode, getparam("mode"), sizeof(mode));
|
strlcpy(mode, getparam("mode"), sizeof(mode));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* for find result, get mode from find form */
|
/* for find result, get mode from find form */
|
||||||
if (isparam("mode"))
|
if (isparam("mode"))
|
||||||
@ -20139,6 +20138,12 @@ void show_elog_list(LOGBOOK *lbs, int past_n, int last_n, int page_n, BOOL defau
|
|||||||
strlcpy(mode, "Full", sizeof(mode));
|
strlcpy(mode, "Full", sizeof(mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// strip any HTML
|
||||||
|
if (strchr(mode, '<'))
|
||||||
|
*strchr(mode, '<') = 0;
|
||||||
|
if (strchr(mode, '\"'))
|
||||||
|
*strchr(mode, '\"') = 0;
|
||||||
|
|
||||||
/* set cookie if mode changed */
|
/* set cookie if mode changed */
|
||||||
mode_cookie[0] = 0;
|
mode_cookie[0] = 0;
|
||||||
if (strieq(mode, "Summary") || strieq(mode, "Full") || strieq(mode, "Threaded")) {
|
if (strieq(mode, "Summary") || strieq(mode, "Full") || strieq(mode, "Threaded")) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user