[
https://issues.apache.org/struts/browse/STR-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46523#action_46523
]
Wes Wannemacher commented on STR-3191:
--------------------------------------
Sorry, Paul, I meant, you are calling TagUtils.getInstance() over and over
again, even though it may be possible to just get one instance and use it
repeatedly. I only brought up the 'if' statements because if they were if/else
blocks, then it may be that TagUtils.getInstance() is only called once. For
instance, instead of what you have I was thinking -
TagUtils utils = TagUtils.getInstance();
if (style != null) {
sb.append(" style=\"");
sb.append(utils.filter(style));
sb.append("\"");
}
if (styleClass != null) {
sb.append(" class=\"");
sb.append(utils.filter(styleClass));
sb.append("\"");
}
It's not a big deal at all. You know much more about what's going on than I do.
Assuming TagUtils is a singleton, the only thing saved is the method call in
my version.
> Sufficently filter HTML tag attribute names and values
> ------------------------------------------------------
>
> Key: STR-3191
> URL: https://issues.apache.org/struts/browse/STR-3191
> Project: Struts 1
> Issue Type: Bug
> Components: Tag Libraries
> Affects Versions: 1.2.9, 1.3.10
> Reporter: Paul Benedict
> Assignee: Paul Benedict
> Priority: Blocker
> Fix For: 1.3.11, 1.4.0
>
> Attachments: STR-3191-patch.txt
>
>
> Allows remote attackers to inject arbitrary web script or HTML via
> unspecified vectors related to insufficient quoting of parameters.
> * https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-2025
> * http://support.novell.com/security/cve/CVE-2008-2025.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.