Skip to content

Commit 8449d13

Browse files
committed
Merge branch 'master' into develop
2 parents 7016083 + 99e0797 commit 8449d13

File tree

10 files changed

+79
-7
lines changed

10 files changed

+79
-7
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## [v4.1.7](https://github.com/codeigniter4/CodeIgniter4/tree/v4.1.7) (2022-01-09)
4+
5+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.1.6...v4.1.7)
6+
7+
**Breaking Changes**
8+
9+
* fix: replace deprecated FILTER_SANITIZE_STRING by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/5555
10+
11+
**Fixed Bugs**
12+
13+
* fix: BaseConnection::getConnectDuration() number_format(): Passing null to parameter by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/5536
14+
* Fix: Debug toolbar selectors by @iRedds in https://github.com/codeigniter4/CodeIgniter4/pull/5544
15+
* Fix: Toolbar. ciDebugBar.showTab() context. by @iRedds in https://github.com/codeigniter4/CodeIgniter4/pull/5554
16+
* Refactor Database Collector display by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/5553
17+
318
## [v4.1.6](https://github.com/codeigniter4/CodeIgniter4/tree/v4.1.6) (2022-01-03)
419

520
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.1.5...v4.1.6)

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CodeIgniter
4545
/**
4646
* The current version of CodeIgniter Framework
4747
*/
48-
public const CI_VERSION = '4.1.6';
48+
public const CI_VERSION = '4.1.7';
4949

5050
private const MIN_PHP_VERSION = '7.3';
5151

system/Helpers/cookie_helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function get_cookie($index, bool $xssClean = false)
6565
{
6666
$prefix = isset($_COOKIE[$index]) ? '' : config(App::class)->cookiePrefix;
6767
$request = Services::request();
68-
$filter = $xssClean ? FILTER_SANITIZE_STRING : FILTER_DEFAULT;
68+
$filter = $xssClean ? FILTER_SANITIZE_FULL_SPECIAL_CHARS : FILTER_DEFAULT;
6969

7070
return $request->getCookie($prefix . $index, $filter);
7171
}

user_guide_src/source/changelogs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ See all the changes.
1212
.. toctree::
1313
:titlesonly:
1414

15+
v4.1.7
1516
v4.1.6
1617
v4.1.5
1718
v4.1.4
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Version 4.1.7
2+
#############
3+
4+
Release Date: January 9, 2022
5+
6+
**4.1.7 release of CodeIgniter4**
7+
8+
.. contents::
9+
:local:
10+
:depth: 2
11+
12+
BREAKING
13+
********
14+
15+
- Because ``FILTER_SANITIZE_STRING`` is deprecated since PHP 8.1, ``get_cookie()`` that uses it when ``$xssClean`` is true changed the output. Now it uses ``FILTER_SANITIZE_FULL_SPECIAL_CHARS``. Note that using XSS filtering is a bad practice. It does not prevent XSS attacks perfectly. Using ``esc()`` with the correct ``$context`` in the views is recommended.
16+
17+
Enhancements
18+
************
19+
20+
none.
21+
22+
Changes
23+
*******
24+
25+
none.
26+
27+
Deprecations
28+
************
29+
30+
none.
31+
32+
Bugs Fixed
33+
**********
34+
35+
See the repo's `CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_ for a complete list of bugs fixed.

user_guide_src/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
version = '4.1'
2525

2626
# The full version, including alpha/beta/rc tags.
27-
release = '4.1.6'
27+
release = '4.1.7'
2828

2929
# -- General configuration ---------------------------------------------------
3030

user_guide_src/source/helpers/cookie_helper.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ The following functions are available:
5353
the ``$cookiePrefix`` that you might've set in your
5454
**app/Config/App.php** file.
5555

56+
.. warning:: Using XSS filtering is a bad practice. It does not prevent XSS attacks perfectly. Using ``esc()`` with the correct ``$context`` in the views is recommended.
57+
5658
.. php:function:: delete_cookie($name[, $domain = ''[, $path = '/'[, $prefix = '']]])
5759
5860
:param string $name: Cookie name

user_guide_src/source/incoming/incomingrequest.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,15 +399,15 @@ The methods provided by the parent classes that are available are:
399399
The second optional parameter lets you run the data through the PHP's
400400
filters. Pass in the desired filter type as the second parameter::
401401

402-
$request->getVar('some_data', FILTER_SANITIZE_STRING);
402+
$request->getVar('some_data', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
403403

404404
To return an array of all POST items call without any parameters.
405405

406406
To return all POST items and pass them through the filter, set the
407407
first parameter to null while setting the second parameter to the filter
408408
you want to use::
409409

410-
$request->getVar(null, FILTER_SANITIZE_STRING);
410+
$request->getVar(null, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
411411
// returns all POST items with string sanitation
412412

413413
To return an array of multiple POST parameters, pass all the required keys as an array::
@@ -417,7 +417,7 @@ The methods provided by the parent classes that are available are:
417417
Same rule applied here, to retrieve the parameters with filtering, set the second parameter to
418418
the filter type to apply::
419419

420-
$request->getVar(['field1', 'field2'], FILTER_SANITIZE_STRING);
420+
$request->getVar(['field1', 'field2'], FILTER_SANITIZE_FULL_SPECIAL_CHARS);
421421

422422
.. php:method:: getGet([$index = null[, $filter = null[, $flags = null]]])
423423
@@ -489,7 +489,7 @@ The methods provided by the parent classes that are available are:
489489
This method is identical to ``getPost()`` and ``getGet()``, only it fetches cookie data::
490490

491491
$request->getCookie('some_cookie');
492-
$request->getCookie('some_cookie', FILTER_SANITIZE_STRING); // with filter
492+
$request->getCookie('some_cookie', FILTER_SANITIZE_FULL_SPECIAL_CHARS); // with filter
493493

494494
To return an array of multiple cookie values, pass all the required keys as an array::
495495

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#############################
2+
Upgrading from 4.1.6 to 4.1.7
3+
#############################
4+
5+
Please refer to the upgrade instructions corresponding to your installation method.
6+
7+
- :ref:`Composer Installation App Starter Upgrading <app-starter-upgrading>`
8+
- :ref:`Composer Installation Adding CodeIgniter4 to an Existing Project Upgrading <adding-codeigniter4-upgrading>`
9+
- :ref:`Manual Installation Upgrading <installing-manual-upgrading>`
10+
11+
.. contents::
12+
:local:
13+
:depth: 2
14+
15+
Breaking Changes
16+
****************
17+
18+
- ``get_cookie()`` when ``$xssClean`` is true changed the output. Now it uses ``FILTER_SANITIZE_FULL_SPECIAL_CHARS``, not ``FILTER_SANITIZE_STRING``. Make sure the change is acceptable or not. Note that using XSS filtering is a bad practice. It does not prevent XSS attacks perfectly. Using ``esc()`` with the correct ``$context`` in the views is recommended.

user_guide_src/source/installation/upgrading.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ upgrading from.
88
.. toctree::
99
:titlesonly:
1010

11+
Upgrading from 4.1.6 to 4.1.7 <upgrade_417>
1112
Upgrading from 4.1.5 to 4.1.6 <upgrade_416>
1213
Upgrading from 4.1.4 to 4.1.5 <upgrade_415>
1314
Upgrading from 4.1.3 to 4.1.4 <upgrade_414>

0 commit comments

Comments
 (0)