mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed XSS vulnerability with show_change_pwd_page and fixed an infinite loop in 'threaded' mode.
This commit is contained in:
parent
3866338848
commit
2476177ea7
20
src/elogd.c
20
src/elogd.c
@ -9005,8 +9005,10 @@ void show_change_pwd_page(LOGBOOK * lbs)
|
||||
rsprintf("<table class=\"dlgframe\" cellspacing=0 align=center>");
|
||||
|
||||
if (wrong_pwd == 1) {
|
||||
if (error_str[0])
|
||||
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n", error_str);
|
||||
if (error_str[0]) {
|
||||
strencode2(str, error_str, sizeof(str));
|
||||
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n", str);
|
||||
}
|
||||
else
|
||||
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n", loc("Wrong password"));
|
||||
}
|
||||
@ -9015,8 +9017,10 @@ void show_change_pwd_page(LOGBOOK * lbs)
|
||||
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n",
|
||||
loc("New passwords do not match, please retype"));
|
||||
|
||||
if (wrong_pwd == 3)
|
||||
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n", error_str);
|
||||
if (wrong_pwd == 3) {
|
||||
strencode2(str, error_str, sizeof(str));
|
||||
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n", str);
|
||||
}
|
||||
|
||||
rsprintf("<tr><td colspan=2 class=\"dlgtitle\">\n");
|
||||
|
||||
@ -20733,7 +20737,8 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
|
||||
if (i == *msg_list[index].lbs->n_el_index)
|
||||
break;
|
||||
|
||||
in_reply_to_id = msg_list[index].lbs->el_index[i].in_reply_to;
|
||||
//in_reply_to_id = msg_list[index].lbs->el_index[i].in_reply_to;
|
||||
in_reply_to_id = 0;
|
||||
|
||||
} while (in_reply_to_id);
|
||||
|
||||
@ -21102,8 +21107,9 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
|
||||
rsprintf("<table width=\"100%%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n");
|
||||
|
||||
if (isparam("last")) {
|
||||
rsprintf("<tr><td nowrap width=\"10%%\" class=\"attribname\">%s:</td>", loc("Restrict seach to last"));
|
||||
rsprintf("<td class=\"attribvalue\">%s %s</td></tr>", getparam("last"), loc("days"));
|
||||
rsprintf("<tr><td nowrap width=\"10%%\" class=\"attribname\">%s:</td>", loc("Restrict search to last"));
|
||||
strencode2(str, getparam("last"), sizeof(str));
|
||||
rsprintf("<td class=\"attribvalue\">%s %s</td></tr>", str, loc("days"));
|
||||
}
|
||||
|
||||
if (isparam("ma") || isparam("ya") || isparam("da") || isparam("ha") || isparam("na")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user