forked from phoedos/pmd
Typo fix and tests
This commit is contained in:
Sergey
committed by
Juan Martín Sotuyo Dodero
parent
a33ac0acaf
commit
382c8ca928
@ -38,7 +38,7 @@ public class VfUnescapeElRule extends AbstractVfRule {
|
||||
private static final String APEX_OUTPUT_TEXT = "apex:outputtext";
|
||||
private static final String APEX_PAGE_MESSAGE = "apex:pagemessage";
|
||||
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";
|
||||
|
||||
@Override
|
||||
|
@ -226,17 +226,16 @@ No XSS via EL via param binding
|
||||
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
No XSS via EL via param binding
|
||||
XSS via item value
|
||||
]]></description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<expected-problems>3</expected-problems>
|
||||
<code><![CDATA[
|
||||
<apex:page>
|
||||
<apex:form>
|
||||
<apex:selectList value="{!string}" size="1">
|
||||
<apex:selectOption itemValue='{!XSS}' itemLabel="Red" 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:form>
|
||||
</apex:page>
|
||||
@ -252,7 +251,7 @@ No XSS with escaped EL
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
<apex:page>
|
||||
<apex:outputText value=" {!HTMLENCODE(myTextField)}" escape="false"/>
|
||||
<apex:outputText value=" {!HTMLENCODE(myTextField) }" escape="false"/>
|
||||
</apex:page>
|
||||
]]></code>
|
||||
<source-type>vf</source-type>
|
||||
|
Reference in New Issue
Block a user