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 14:49:38 +02:00
|
|
|
|
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[]
|
2023-06-22 10:38:01 +02:00
|
|
|
|
2021-09-20 15:38:42 +02:00
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::../message.adoc[]
|
|
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|