Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
[CVE-2010-0432] Merged from trunk r920369:
Browse files Browse the repository at this point in the history
Menu widget links of type hidden-form were not correctly encoding the value attribute.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/branches/release09.04@920379 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
lektran committed Mar 8, 2010
1 parent 16e283b commit 68de490
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,16 @@ public void renderLink(Appendable writer, Map<String, Object> context, ModelMenu
writer.append(uniqueItemName);
writer.append("\">");

StringUtil.SimpleEncoder simpleEncoder = (StringUtil.SimpleEncoder) context.get("simpleEncoder");
for (WidgetWorker.Parameter parameter: link.getParameterList()) {
writer.append("<input name=\"");
writer.append(parameter.getName());
writer.append("\" value=\"");
writer.append(parameter.getValue(context));
if (simpleEncoder != null) {
writer.append(simpleEncoder.encode(parameter.getValue(context)));
} else {
writer.append(parameter.getValue(context));
}
writer.append("\" type=\"hidden\"/>");
}

Expand Down

0 comments on commit 68de490

Please sign in to comment.