Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling latest changes from pmd/pmd: 12/15/2020 #1

Merged
merged 263 commits into from
Dec 15, 2020
Merged

Conversation

rmohan20
Copy link
Owner

Describe the PR

Related issues

  • Fixes #

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by travis)
  • Added (in-code) documentation (if needed)

adangel and others added 30 commits October 22, 2020 09:40
[java] CloseResource - Fix #2764: False-negative when re-assigning variable #2811
[doc] Include deprecated rule references in documentation (Fixes #2823) #2824
[core] Fix XMLRenderer newlines when running under IBM Java #2831
[vf] Allow attributes with dot in Visualforce #2834
[core] Bump antlr4 from 4.7 to 4.7.2 #2842
[apex] Detect 'Database' method invocations inside loops #2816
Addresses the general issue raised in #1092 This commit removes false positives from expressions in apex tags. The specific use case raised in 1092 isn't reproducible and represents a false negative that will be fixed separately.

The existing Visualforce rules don't have any information about the data types referenced in the Visualforce page. This results in false positives when attempting to identify expressions that are vulnerable to XSS attacks. The rules should not warn about XSS attacks when the expression refers to a type such as Integer or Boolean.

The VfExpressionTypeVisitor visits the Visualforce page and extracts the datatypes from Salesforce metadata. Data type information can come from either Apex classes or Object Fields. The Salesforce metadata is generally located in a sibling directory of the Visualforce directory. By default the code looks in directories relative to the Visualforce file to find the metadata. The conventional locations for the metadata are "../classes" and "../objects", the user can override this default with other directories if required.
Since the default minimum is 30, I believe it would make more sense if the comment said "28" instead of "18".
Docs of CouplingBetweenObjects has a Programming issue. I also made "something" a method.
[java] (doc) Update ExcessiveImports example code for clarity #2865
[java] (doc) Fix example for CouplingBetweenObjects #2866
[apex] Add support for Safe Navigation Operator (v50, Winter 21) #2863
oowekyala and others added 29 commits November 30, 2020 18:07
This DataType does not need to be escaped, it is always escaped by the
server.
[core] New RuleSet API and deprecations for PMD's entry point APIs #2635
The same problem would have occurred for the release build.
@rmohan20 rmohan20 merged commit 62c9b8f into rmohan20:master Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
10 participants