27 lines
654 B
Plaintext
27 lines
654 B
Plaintext
![]() |
include::../description.adoc[]
|
||
|
|
||
|
include::../ask-yourself.adoc[]
|
||
|
|
||
|
include::../recommended.adoc[]
|
||
|
|
||
|
== Sensitive Code Example
|
||
|
|
||
|
CakePHP
|
||
|
----
|
||
|
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[]
|