Skip to content

Commit 3806ff5

Browse files
authored
Merge pull request #9113 from kenjis/docs-CSRF-filter
docs: update comments for CSRF
2 parents c1aad11 + a325d2e commit 3806ff5

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

system/Filters/CSRF.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use CodeIgniter\HTTP\RequestInterface;
1919
use CodeIgniter\HTTP\ResponseInterface;
2020
use CodeIgniter\Security\Exceptions\SecurityException;
21+
use CodeIgniter\Security\Security;
2122

2223
/**
2324
* CSRF filter.
@@ -30,14 +31,7 @@
3031
class CSRF implements FilterInterface
3132
{
3233
/**
33-
* Do whatever processing this filter needs to do.
34-
* By default it should not return anything during
35-
* normal execution. However, when an abnormal state
36-
* is found, it should return an instance of
37-
* CodeIgniter\HTTP\Response. If it does, script
38-
* execution will end and that Response will be
39-
* sent back to the client, allowing for error pages,
40-
* redirects, etc.
34+
* CSRF verification.
4135
*
4236
* @param list<string>|null $arguments
4337
*
@@ -51,6 +45,7 @@ public function before(RequestInterface $request, $arguments = null)
5145
return;
5246
}
5347

48+
/** @var Security $security */
5449
$security = service('security');
5550

5651
try {

system/Security/Security.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ private function configureCookie(CookieConfig $cookie): void
233233
}
234234

235235
/**
236-
* CSRF Verify
236+
* CSRF verification.
237237
*
238238
* @return $this
239239
*

0 commit comments

Comments
 (0)