Renaming rules to security, fixing leading whitespaces
This commit is contained in:
parent
1218cd5c5b
commit
f799cf2e5b
@ -152,8 +152,8 @@ PARSER_END(VfParser)
|
||||
|
||||
<AttrValueState> TOKEN :
|
||||
{
|
||||
<SINGLE_QUOTE: "'"> : AttrValueBetweenSingleQuotesState
|
||||
| <DOUBLE_QUOTE: "\""> : AttrValueBetweenDoubleQuotesState
|
||||
<SINGLE_QUOTE: (<WHITESPACES>)? "'"> : AttrValueBetweenSingleQuotesState
|
||||
| <DOUBLE_QUOTE: (<WHITESPACES>)? "\"">: AttrValueBetweenDoubleQuotesState
|
||||
| <NO_QUOTE_NO_WHITESPACE: ~["\"","'"," "] > { input_stream.backup(1);} : AttrValueNoQuotesState
|
||||
| <IN_ATTR_WHITESPACE: [" "] > : InTagState //support for empty attributes
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>pmd-visualforce</artifactId>
|
||||
<name>PMD VISUALFORCE</name>
|
||||
<name>PMD Visualforce</name>
|
||||
|
||||
<parent>
|
||||
<groupId>net.sourceforge.pmd</groupId>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.vf.rule.basic;
|
||||
package net.sourceforge.pmd.lang.vf.rule.security;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
@ -2,4 +2,4 @@
|
||||
# BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
#
|
||||
|
||||
rulesets.filenames=rulesets/vf/basic.xml
|
||||
rulesets.filenames=rulesets/vf/security.xml
|
||||
|
@ -8,10 +8,10 @@
|
||||
<description>Rules concerning basic VF guidelines.</description>
|
||||
|
||||
<rule name="VfUnescapeEl" since="3.7"
|
||||
message="Avoid unescaping of user controlled content in EL such as ''{0}''"
|
||||
class="net.sourceforge.pmd.lang.vf.rule.basic.VfUnescapeElRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/rules/vf/basic.html#VfUnescapeElRule">
|
||||
<description><![CDATA[Avoid unescaping of user controlled content in EL to avoid XSS. ]]>
|
||||
message="Avoid unescaped user controlled content in EL"
|
||||
class="net.sourceforge.pmd.lang.vf.rule.security.VfUnescapeElRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/rules/vf/security.html#VfUnescapeElRule">
|
||||
<description><![CDATA[Avoid unescaped user controlled content in EL as it results in XSS. ]]>
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
@ -2,13 +2,13 @@
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.vf.rule.basic;
|
||||
package net.sourceforge.pmd.lang.vf.rule.security;
|
||||
|
||||
import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
|
||||
|
||||
public class BasicRulesTest extends SimpleAggregatorTst {
|
||||
public class SecurityRulesTest extends SimpleAggregatorTst {
|
||||
|
||||
private static final String RULESET = "vf-basic";
|
||||
private static final String RULESET = "vf-security";
|
||||
|
||||
@Override
|
||||
public void setUp() {
|
@ -59,6 +59,6 @@ No XSS via EL via param binding
|
||||
|
||||
]]></code>
|
||||
<source-type>vf</source-type>
|
||||
</test-code>
|
||||
</test-code>
|
||||
|
||||
</test-data>
|
Loading…
x
Reference in New Issue
Block a user