Fixed invalid "mode" parameter

This commit is contained in:
2022-05-10 13:15:45 +02:00
parent 9adae9b632
commit e70bd68d9f
+6 -1
View File
@@ -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 */
if (isparam("mode"))
strlcpy(mode, getparam("mode"), sizeof(mode));
} else {
/* for find result, get mode from find form */
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));
}
// strip any HTML
if (strchr(mode, '<'))
*strchr(mode, '<') = 0;
if (strchr(mode, '\"'))
*strchr(mode, '\"') = 0;
/* set cookie if mode changed */
mode_cookie[0] = 0;
if (strieq(mode, "Summary") || strieq(mode, "Full") || strieq(mode, "Threaded")) {