forked from phoedos/pmd
Bug fix
This commit is contained in:
@ -60,6 +60,7 @@ public class VfUnescapeElRule extends AbstractVfRule {
|
||||
|
||||
if (n instanceof ASTText) {
|
||||
prevText = (ASTText) n;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (n instanceof ASTElExpression) {
|
||||
@ -92,7 +93,7 @@ public class VfUnescapeElRule extends AbstractVfRule {
|
||||
|
||||
private boolean isUnbalanced(String image, String pattern) {
|
||||
int occurance = 0;
|
||||
int index = image.lastIndexOf("=");
|
||||
int index = image.indexOf("=");
|
||||
index = image.indexOf(pattern, index + 1);
|
||||
while (index >= 0) {
|
||||
occurance++;
|
||||
|
@ -1,6 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<test-data>
|
||||
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
No XSS in safe commands quoted context
|
||||
]]></description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
<apex:page>
|
||||
<script>
|
||||
window.parent.opener.location.href = '/apex/FSINT_BRAZIL_CaseViewPage?Id={!case.Id}&isdtp=vw';
|
||||
</script>
|
||||
</apex:page>
|
||||
]]></code>
|
||||
<source-type>vf</source-type>
|
||||
</test-code>
|
||||
|
||||
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
No XSS in safe commands quoted context
|
||||
|
Reference in New Issue
Block a user