Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion user_guide_src/source/incoming/filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,18 @@ In this example, the array ``['dual', 'noreturn']`` will be passed in ``$argumen
Provided Filters
****************

The filters bundled with CodeIgniter4 are: ``Honeypot``, ``CSRF``, ``InvalidChars``, ``SecureHeaders``, and ``DebugToolbar``.
The filters bundled with CodeIgniter4 are: :doc:`Honeypot <../libraries/honeypot>`, :ref:`CSRF <cross-site-request-forgery>`, ``InvalidChars``, ``SecureHeaders``, and :ref:`DebugToolbar <the-debug-toolbar>`.

.. note:: The filters are executed in the order defined in the config file. However, if enabled, ``DebugToolbar`` is always executed last because it should be able to capture everything that happens in the other filters.

InvalidChars
=============

This filter prohibits user input data (``$_GET``, ``$_POST``, ``$_COOKIE``, ``php://input``) from containing the following characters:

- invalid UTF-8 characters
- control characters except line break and tab code

SecureHeaders
=============

Expand Down
2 changes: 2 additions & 0 deletions user_guide_src/source/libraries/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ If you find a case where you do need direct access though, you may load it throu

$security = \Config\Services::security();

.. _cross-site-request-forgery:

*********************************
Cross-site request forgery (CSRF)
*********************************
Expand Down