This commit is contained in:
Sergey
2017-03-02 15:57:26 -08:00
parent 6137baf615
commit 1942e94cec
2 changed files with 18 additions and 1 deletions

View File

@ -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++;

View File

@ -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