forked from I2P_Developers/i2p.i2p
Console: Fix URLs caught in XSS filter on /confighome (ticket #1569)
Fix name and URL escaping Truncate long URLs in display
This commit is contained in:
@ -58,18 +58,21 @@ public class ConfigHomeHandler extends FormHandler {
|
||||
else
|
||||
apps = HomeHelper.buildApps(_context, config);
|
||||
if (adding) {
|
||||
String name = getJettyString("name");
|
||||
String name = getJettyString("nofilter_name");
|
||||
if (name == null || name.length() <= 0) {
|
||||
addFormError(_("No name entered"));
|
||||
return;
|
||||
}
|
||||
String url = getJettyString("url");
|
||||
String url = getJettyString("nofilter_url");
|
||||
if (url == null || url.length() <= 0) {
|
||||
addFormError(_("No URL entered"));
|
||||
return;
|
||||
}
|
||||
name = DataHelper.escapeHTML(name).replace(",", ","); // HomeHelper.S
|
||||
url = DataHelper.escapeHTML(url).replace(",", ",");
|
||||
// these would get double-escaped so we can't do it this way...
|
||||
//name = DataHelper.escapeHTML(name).replace(",", ",");
|
||||
//url = DataHelper.escapeHTML(url).replace(",", ",");
|
||||
name = name.replace(",", ".");
|
||||
url = url.replace(",", "."); // fail
|
||||
HomeHelper.App app = null;
|
||||
if ("1".equals(group))
|
||||
app = new HomeHelper.App(name, "", url, "/themes/console/images/eepsite.png");
|
||||
|
Reference in New Issue
Block a user