A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/2210 below:

Support WITH SECURITY_ENFORCED · Issue #2210 · pmd/pmd · GitHub

Affects PMD Version:

Rule: ApexCRUDViolation

Description:
(from https://sourceforge.net/p/pmd/discussion/188192/thread/5aef500464/?limit=25#196a)

Hi,

PMD is going to take in consideration new apex function stripInaccessible https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_apex_Security_stripInaccessible_GA.htm
or WITH SECURITY_ENFORCED https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_apex_WithSecurityEnforced_GA.htm
concerning the security error "ApexCRUDViolation " ?

Thanks

Code Sample demonstrating the issue:

public class Foo {
	public Contact foo(String tempID) {
                Contact c;
                // this is missing with security enforced
                c = [SELECT Name FROM Contact WHERE Id=: tempID];
                // that's ok
		c = [SELECT Name FROM Contact WHERE Id=: tempID WITH SECURITY_ENFORCED];
		return c;
	}
}

daviddwd8, gudipudiharish, vnehess and victorandresvassdaviddwd8


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4