File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 404
404
| Determines whether the XSS filter is always active when GET, POST or
405
405
| COOKIE data is encountered
406
406
|
407
+ | WARNING: This feature is DEPRECATED and currently available only
408
+ | for backwards compatibility purposes!
409
+ |
407
410
*/
408
411
$ config ['global_xss_filtering ' ] = FALSE ;
409
412
Original file line number Diff line number Diff line change @@ -480,6 +480,7 @@ Release Date: Not Released
480
480
481
481
- :doc: `Input Library <libraries/input >` changes include:
482
482
483
+ - Deprecated the ``$config['global_xss_filtering'] `` setting.
483
484
- Added ``method() `` to retrieve ``$_SERVER['REQUEST_METHOD'] ``.
484
485
- Added support for arrays and network addresses (e.g. 192.168.1.1/24) for use with the *proxy_ips * setting.
485
486
- Added method ``input_stream() `` to aid in using **php://input ** stream data such as one passed via PUT, DELETE and PATCH requests.
Original file line number Diff line number Diff line change @@ -551,6 +551,22 @@ PHP's native ``hash()`` function. It is deprecated and scheduled for removal in
551
551
.. note :: This function is still available, but you're strongly encouraged to remove its usage sooner
552
552
rather than later.
553
553
554
+ The $config['global_xss_filtering'] setting
555
+ ===========================================
556
+
557
+ As already explained above, XSS filtering should not be done on input data,
558
+ but on output instead. Therefore, the ``$config['global_xss_filtering'] ``,
559
+ which automatically filters *input * data, is considered a bad practice and
560
+ is now deprecated.
561
+
562
+ Instead, you should manually escape any user-provided data via the
563
+ :php:func: `xss_clean() ` function when you need to output it, or use a
564
+ library like `HTML Purifier <http://htmlpurifier.org/ >`_ that does that
565
+ for you.
566
+
567
+ .. note :: The setting is still available, but you're strongly encouraged to
568
+ remove its usage sooner rather than later.
569
+
554
570
File helper read_file()
555
571
=======================
556
572
Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ this::
53
53
Please refer to the :doc: `Security class <security >` documentation for
54
54
information on using XSS Filtering in your application.
55
55
56
+ .. important :: The 'global_xss_filtering' setting is DEPRECATED and kept
57
+ solely for backwards-compatibility purposes. XSS escaping should
58
+ be performed on *output *, not *input *!
59
+
56
60
*******************
57
61
Accessing form data
58
62
*******************
You can’t perform that action at this time.
0 commit comments