Fixed invalid "mode" parameter
This commit is contained in:
+6
-1
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user