Typo fix and tests

This commit is contained in:
Sergey
2017-02-28 09:45:11 -08:00
parent 452bb8e6ed
commit a7cf5319c3
2 changed files with 5 additions and 6 deletions

View File

@ -38,7 +38,7 @@ public class VfUnescapeElRule extends AbstractVfRule {
private static final String APEX_OUTPUT_TEXT = "apex:outputtext"; private static final String APEX_OUTPUT_TEXT = "apex:outputtext";
private static final String APEX_PAGE_MESSAGE = "apex:pagemessage"; private static final String APEX_PAGE_MESSAGE = "apex:pagemessage";
private static final String APEX_PAGE_MESSAGES = "apex:pagemessages"; private static final String APEX_PAGE_MESSAGES = "apex:pagemessages";
private static final String APEX_SELECT_OPTION = "apex:selectoption "; private static final String APEX_SELECT_OPTION = "apex:selectoption";
private static final String FALSE = "false"; private static final String FALSE = "false";
@Override @Override

View File

@ -226,17 +226,16 @@ No XSS via EL via param binding
<test-code> <test-code>
<description><![CDATA[ <description><![CDATA[
No XSS via EL via param binding XSS via item value
]]></description> ]]></description>
<expected-problems>0</expected-problems> <expected-problems>3</expected-problems>
<code><![CDATA[ <code><![CDATA[
<apex:page> <apex:page>
<apex:form> <apex:form>
<apex:selectList value="{!string}" size="1"> <apex:selectList value="{!string}" size="1">
<apex:selectOption itemValue='{!XSS}' itemLabel="Red" itemEscaped="false"/> <apex:selectOption itemValue='{!XSS}' itemLabel="Red" itemEscaped="false"/>
<apex:selectOption itemValue={!XSS} itemLabel="Blue" itemEscaped="false"/> <apex:selectOption itemValue={!XSS} itemLabel="Blue" itemEscaped="false"/>
<apex:selectOption itemValue="{!XSS}" itemLabel="Green" itemEscaped="false"/> <apex:selectOption itemValue="{!XSS}" itemLabel="Green" itemEscaped="false"/>
</apex:selectList> </apex:selectList>
</apex:form> </apex:form>
</apex:page> </apex:page>
@ -252,7 +251,7 @@ No XSS with escaped EL
<expected-problems>0</expected-problems> <expected-problems>0</expected-problems>
<code><![CDATA[ <code><![CDATA[
<apex:page> <apex:page>
<apex:outputText value=" {!HTMLENCODE(myTextField)}" escape="false"/> <apex:outputText value=" {!HTMLENCODE(myTextField) }" escape="false"/>
</apex:page> </apex:page>
]]></code> ]]></code>
<source-type>vf</source-type> <source-type>vf</source-type>