rspec/rules/S4834/php/rule.adoc

38 lines
820 B
Plaintext
Raw Normal View History

2020-06-30 12:49:37 +02:00
include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
CakePHP
2020-06-30 12:49:37 +02:00
----
use Cake\Auth\BaseAuthorize;
use Cake\Controller\Controller;
abstract class MyAuthorize extends BaseAuthorize { // Sensitive. Method extending Cake\Auth\BaseAuthorize.
// ...
}
// Note that "isAuthorized" methods will only be detected in direct subclasses of Cake\Controller\Controller.
abstract class MyController extends Controller {
public function isAuthorized($user) { // Sensitive. Method called isAuthorized in a Cake\Controller\Controller.
return false;
}
}
----
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
endif::env-github,rspecator-view[]