Console: Fix delete confirmation on /configplugins

Replace /configclients and /configplugins onclick with js file
Remove unsafe CSP on /configclients
This commit is contained in:
zzz
2020-05-11 16:43:53 +00:00
parent 4da58258f5
commit 7da2ac9ef3
5 changed files with 36 additions and 5 deletions

View File

@ -401,9 +401,7 @@ public class ConfigClientsHelper extends HelperBase {
}
if (showDeleteButton && (!edit) && !ro) {
buf.append("<button type=\"submit\" title=\"").append(_t("Delete")).append("\" class=\"control delete\" name=\"action\" value=\"Delete ").append(index)
.append("\" onclick=\"if (!confirm('")
.append(_t("Are you sure you want to delete {0}?", _t(escapedName)))
.append("')) { return false; }\">")
.append("\" client=\"").append(_t(escapedName)).append("\">")
.append(_t("Delete")).append("<span class=hide> ").append(index).append("</span></button>");
}
buf.append("</td><td align=\"left\">");