Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2-EE-GA_P01, 2.0-Beta2
-
Fix Version/s: 2.0.0
-
Component/s: Framework, ICE-Components
-
Labels:None
-
Environment:All
Description
-
Hide
- Case9225Example.war
- 6.33 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/.../example/TestBean.class 1.0 kB
- WEB-INF/faces-config.xml 0.9 kB
- WEB-INF/lib/FastInfoset.jar 285 kB
- WEB-INF/lib/backport-util-concurrent.jar 319 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/commons-discovery.jar 75 kB
- WEB-INF/lib/commons-el.jar 110 kB
- WEB-INF/lib/commons-fileupload.jar 56 kB
- WEB-INF/lib/commons-lang.jar 240 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/icefaces-comps.jar 1.96 MB
- WEB-INF/lib/icefaces.jar 1.20 MB
- WEB-INF/lib/jsf-api-1.2.jar 352 kB
- WEB-INF/lib/jsf-impl-1.2.jar 822 kB
- WEB-INF/web.xml 3 kB
- display-listbox-page.jspx 1 kB
- display-page.jspx 1.0 kB
- index.jsp 0.1 kB
- main.jspx 1 kB
- page.jspx 0.9 kB
-
Hide
- Case9225Example2.war
- 2.25 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/.../example/TestBean.class 1.0 kB
- WEB-INF/faces-config.xml 1 kB
- WEB-INF/lib/commons-beanutils.jar 113 kB
- WEB-INF/lib/commons-collections.jar 162 kB
- WEB-INF/lib/commons-digester.jar 104 kB
- WEB-INF/lib/commons-logging.jar 30 kB
- WEB-INF/lib/jsf-api.jar 312 kB
- WEB-INF/lib/jsf-impl.jar 1.14 MB
- WEB-INF/lib/jstl.jar 20 kB
- WEB-INF/lib/standard.jar 380 kB
- WEB-INF/web.xml 0.8 kB
- display-listbox-page.jsp 1.0 kB
- display-page.jsp 0.8 kB
- welcomeJSF.jsp 1 kB
-
Hide
- Case9225ExampleCode.zip
- 36 kB
- Arran Mccullough
-
- Case9225Example2/build.xml 3 kB
- Case9225Example2/.../ant-deploy.xml 2 kB
- Case9225Example2/.../build-impl.xml 46 kB
- Case9225Example2/.../faces-config.NavData 0.3 kB
- Case9225Example2/.../genfiles.properties 0.5 kB
- Case9225Example2/.../private.properties 2 kB
- Case9225Example2/nbproject/.../private.xml 0.2 kB
- Case9225Example2/.../project.properties 2 kB
- Case9225Example2/nbproject/project.xml 1 kB
- Case9225Example2/src/conf/MANIFEST.MF 0.0 kB
- Case9225Example2/src/.../TestBean.java 0.6 kB
- Case9225Example2/.../display-listbox-page.jsp 1.0 kB
- Case9225Example2/web/display-page.jsp 0.8 kB
- Case9225Example2/web/.../context.xml 0.1 kB
- Case9225Example2/web/.../faces-config.xml 1 kB
- Case9225Example2/web/WEB-INF/web.xml 0.8 kB
- Case9225Example2/web/welcomeJSF.jsp 1 kB
- Case9225Example/build.xml 3 kB
- Case9225Example/nbproject/ant-deploy.xml 2 kB
- Case9225Example/nbproject/build-impl.xml 46 kB
- Case9225Example/.../faces-config.NavData 0.7 kB
- Case9225Example/.../genfiles.properties 0.5 kB
- Case9225Example/.../private.properties 2 kB
- Case9225Example/nbproject/.../private.xml 0.2 kB
- Case9225Example/.../project.properties 2 kB
- Case9225Example/nbproject/project.xml 0.9 kB
- Case9225Example/src/conf/MANIFEST.MF 0.0 kB
- Case9225Example/src/.../TestBean.java 0.6 kB
- Case9225Example/.../display-listbox-page.jspx 1 kB
- Case9225Example/web/display-page.jspx 1.0 kB
-
Hide
- showcase-additions.zip
- 4 kB
- Ted Goddard
-
- display-listbox-page.xhtml 1 kB
- display-page.xhtml 0.9 kB
- main.xhtml 1 kB
- page.xhtml 0.9 kB
- WEB-INF/faces-config.xml 3 kB
- WEB-INF/classes/.../example/TestBean.class 1.0 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Verified problem to still be present with ICEfaces 2.0 compat.
For instance, the following string will result in script execution when set on the selectOne:
<script>alert('hello')</script>
Attached file can be unzipped in component-showcase expanded directory to reproduce the problem.
Code from compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/MenuRenderer.java
Text labelNode = doc.createTextNode(label == null ? valueString : label);
A DOM Text object is created directly from the component valueString. Most calls to createTextNode are invoked via domContext.createTextNode(), many are of the form
domContext.getDocument().createTextNode(detail);
The legacy DOMContext API could be modified to perform escaping and the few remaining cases that operate on the DOM directly could be replaced with DOMContext versions.
Compat components have been modified to use createTextNodeUnescaped only when necessary. Note that there are possible script injection attacks through some of the scripts generated by components, for instance:
Ice.FCKeditor.register ('iceform:iceInpRchTxt', new Ice.FCKeditor('iceform:iceInpRchTxt', 'en', '', '/component-showcase/icefaces/resource/LTQ5MTYyMDg1Mw==/','600', '275', 'Default', 'null', 'silver'))
The 'null' in the above consists of options passed to the editor component. If these options are dynamically generated from user input, there is the possibility of script injection attacks.
The fix was not overly complex and could be back-ported to ICEfaces 1.8 if required.
Case9225Example.war = JSF example