Skip to content

Commit f2cf801

Browse files
committed
Prep for 4.7.6 release
1 parent 1cd7a4e commit f2cf801

8 files changed

Lines changed: 109 additions & 19 deletions

File tree

‎CHANGELOG.md‎

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

3+
## [v4.7.6](https://github.com/codeigniter4/CodeIgniter4/tree/v4.7.6) (2026-11-01)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.7.5...v4.7.6)
5+
6+
### Security
7+
8+
* **Cache:** ``FileHandler::deleteMatching()`` now matches the pattern against cache
9+
file names only. Previously, a pattern such as ``../*`` could delete files outside
10+
the cache directory. Patterns can no longer match files in subdirectories of the
11+
cache directory, so those files are no longer deleted. Special characters in the
12+
cache path, such as ``[``, are no longer interpreted as part of the pattern.
13+
See the `Security advisory GHSA-9hf2-g3w9-pfmp <https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-9hf2-g3w9-pfmp>`_
14+
for more information. See :ref:`upgrade-476-cache-delete-matching` for migration
15+
instructions.
16+
* **Model:** Fixed a mass assignment vulnerability in ``replace()``.
17+
The method now discards fields not listed in ``$allowedFields`` when field
18+
protection is enabled, while retaining a supplied primary key. Input emptied
19+
by filtering, or reduced to only its primary key, now throws a ``DataException``.
20+
Previously, applications passing untrusted input to ``replace()`` could write
21+
protected columns. See :doc:`Upgrading from 4.7.5 to 4.7.6 </installation/upgrade_476>`
22+
for migration instructions.
23+
See the `Security advisory GHSA-jv74-fx4h-m63x <https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-jv74-fx4h-m63x>`_
24+
for more information.
25+
* **Security Helper:** Fixed a path traversal vulnerability in ``sanitize_filename()``.
26+
Backslashes were only removed by a final ``stripslashes()`` call after filtering.
27+
When ``$relativePath`` was ``true``, input such as ``.\./`` became ``../`` on all
28+
platforms. In both modes, repeated backslashes could survive as Windows path
29+
separators, and ``\0`` could become a NUL byte.
30+
Backslashes are now removed during filtering, and ``stripslashes()`` is no longer
31+
called. Forward slashes are still preserved when ``$relativePath`` is ``true``.
32+
The same applies to ``Security::sanitizeFilename()``.
33+
See :doc:`Upgrading from 4.7.5 to 4.7.6 </installation/upgrade_476>` and the
34+
`Security advisory GHSA-9j59-qcxw-q7qm <https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-9j59-qcxw-q7qm>`_
35+
for more information.
36+
* **Database:** Fixed a SQL injection vulnerability in named query bindings.
37+
When a query combined named binds (``:name:``) with a value that was already
38+
escaped and rendered into the SQL (for example a subquery passed to ``where()``,
39+
``union()``, ``fromSubquery()`` or ``selectSubquery()``, a custom ``where()``
40+
string built with ``$db->escape()``, the ``WHERE`` binds of ``deleteBatch()``,
41+
or a manually escaped fragment in ``$db->query()``), a placeholder inside that
42+
value was replaced with the bind of the same name, which could break out of the
43+
string literal. Placeholders are now ignored inside quoted strings, quoted
44+
identifiers and SQL comments, and the ``WHERE`` binds of ``deleteBatch()`` are
45+
substituted only after the batch data has been rendered into the query.
46+
Plain ``where()``, ``like()``, ``insert()`` and ``update()`` calls were not affected.
47+
See the `Security advisory GHSA-25rf-99hr-7pmr <https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-25rf-99hr-7pmr>`_
48+
and :ref:`upgrade-476-named-binds` for more information.
49+
50+
### Fixed Bugs
51+
52+
* fix: preserve JSON request body when CSRF token is not in it by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10620
53+
* fix: sort generator imports in templates with CRLF line endings by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10622
54+
* fix: handle invalid values and empty tag names in XMLFormatter by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10626
55+
* fix: detect X-Forwarded-Proto case-insensitively in isSecure() by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10627
56+
* fix: refresh REQUEST after URI GET normalization by @rahul05ranjan in https://github.com/codeigniter4/CodeIgniter4/pull/10606
57+
* fix: widen accepted values in `set_value()`'s `$default` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10641
58+
* fix: fix array handling in ContentSecurityPolicy::setDefaultSrc() and add addDefaultSrc() by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10635
59+
* fix: reject missing keys in `CLI::promptByMultipleKeys()` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10654
60+
* fix: normalize string values and keys in `ContentSecurityPolicy::addOption()` by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10636
61+
* fix(HTTP): read request body when `post_max_size` is unlimited by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10646
62+
* fix: apply `ContentSecurityPolicy::reportOnly()` to config sources after construction by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10663
63+
* fix: stop prompts from asking forever when the input ends by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10658
64+
* fix: ignore media ranges without a subtype in `Negotiate::media()` by @wleeaf in https://github.com/codeigniter4/CodeIgniter4/pull/10660
65+
* fix: clear transaction state when reconnect() replaces the socket by @KevinBlakeLopez in https://github.com/codeigniter4/CodeIgniter4/pull/10650
66+
* fix: do not let wildcards select values excluded with q=0 in `Negotiate` by @wleeaf in https://github.com/codeigniter4/CodeIgniter4/pull/10661
67+
* fix: keep writes transactional after MySQL deadlock 1213 by @KevinBlakeLopez in https://github.com/codeigniter4/CodeIgniter4/pull/10651
68+
* fix(Cache): isolate the factories cache files used by the tests by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10647
69+
* fix: restore the timezone, locale and string format when unserializing `Time` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10682
70+
* fix: preserve subclass types in route group callbacks by @maniaba in https://github.com/codeigniter4/CodeIgniter4/pull/10644
71+
* fix(HTTP): remove invalid `CURLOPT_HTTPHEADER` string assignment in `CURLRequest` by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10695
72+
73+
### Refactoring
74+
75+
* refactor: remove `@see` test annotations in source by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10624
76+
* refactor: fix `null` checks that are always `false` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10670
77+
378
## [v4.7.5](https://github.com/codeigniter4/CodeIgniter4/tree/v4.7.5) (2026-10-09)
479
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.7.4...v4.7.5)
580

‎admin/generate-changelog.php‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,13 @@
140140
exit(0);
141141
}
142142

143-
$updated = preg_replace('/\A# Changelog\n\n/', "# Changelog\n\n{$entry}\n", $changelog, 1, $count);
143+
$updated = preg_replace_callback(
144+
'/\A# Changelog\n\n/',
145+
static fn (): string => "# Changelog\n\n{$entry}\n",
146+
$changelog,
147+
1,
148+
$count,
149+
);
144150

145151
if ($count !== 1) {
146152
echo 'Could not find the "# Changelog" header in CHANGELOG.md.' . "\n";

‎admin/update-upgrade-guide.php‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,23 @@ function bullets(array $items): string
7979
// Paths that are not part of the project space. Keep in sync with the
8080
// distribution repos: `tests/` is not used there, see "admin/starter/tests".
8181
$excludes = [
82-
':!.github/', ':!admin/', ':!changelogs/', ':!contributing/',
83-
':!system/', ':!tests/', ':!user_guide_src/', ':!utils/',
84-
':!*.json', ':!*.xml', ':!*.dist', ':!rector.php', ':!structarmed.php',
85-
':!phpstan*', ':!psalm*', ':!.php-cs-fixer.*', ':!LICENSE', ':!CHANGELOG.md',
82+
':!.github/',
83+
':!admin/',
84+
':!changelogs/',
85+
':!contributing/',
86+
':!system/',
87+
':!tests/',
88+
':!user_guide_src/',
89+
':!utils/',
90+
':!.*',
91+
':!*.md',
92+
':!*.json',
93+
':!*.xml',
94+
':!phpstan*',
95+
':!psalm*',
96+
':!rector.php',
97+
':!structarmed*',
98+
':!LICENSE',
8699
];
87100

88101
$command = sprintf(

‎phpdoc.dist.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<output>api/build/</output>
1111
<cache>api/cache/</cache>
1212
</paths>
13-
<version number="4.7.5">
13+
<version number="4.7.6">
1414
<api format="php">
1515
<source dsn=".">
1616
<path>system</path>

‎system/CodeIgniter.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CodeIgniter
5353
/**
5454
* The current version of CodeIgniter Framework
5555
*/
56-
public const CI_VERSION = '4.7.6-dev';
56+
public const CI_VERSION = '4.7.6';
5757

5858
/**
5959
* App startup time.

‎user_guide_src/source/changelogs/v4.7.6.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Version 4.7.6
33
#############
44

5-
Release Date: Unreleased
5+
Release Date: November 1, 2026
66

77
**4.7.6 release of CodeIgniter4**
88

‎user_guide_src/source/conf.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
version = '4.7'
2727

2828
# The full version, including alpha/beta/rc tags.
29-
release = '4.7.5'
29+
release = '4.7.6'
3030

3131
# -- General configuration ---------------------------------------------------
3232

‎user_guide_src/source/installation/upgrade_476.rst‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,14 @@ Please refer to the upgrade instructions corresponding to your installation meth
1212
:local:
1313
:depth: 2
1414

15-
**********************
16-
Mandatory File Changes
17-
**********************
18-
1915
****************
2016
Breaking Changes
2117
****************
2218

2319
.. _upgrade-476-cache-delete-matching:
2420

25-
File Cache deleteMatching() No Longer Matches Subdirectories
26-
============================================================
21+
File Cache ``deleteMatching()`` No Longer Matches Subdirectories
22+
================================================================
2723

2824
For security reasons, ``FileHandler::deleteMatching()`` now matches the pattern against
2925
the names of files in the cache directory only. See the
@@ -44,8 +40,8 @@ the :php:func:`delete_files()` helper function.
4440

4541
.. _upgrade-476-model-replace:
4642

47-
Model Field Protection for replace()
48-
====================================
43+
Model Field Protection for ``replace()``
44+
========================================
4945

5046
For security reasons, ``Model::replace()`` now applies field protection:
5147

@@ -144,12 +140,12 @@ and it is recommended that you merge the updated versions with your application:
144140
Config
145141
------
146142

147-
- @TODO
143+
- No config files were changed in this release.
148144

149145
All Changes
150146
===========
151147

152148
This is a list of all files in the **project space** that received changes;
153149
many will be simple comments or formatting that have no effect on the runtime:
154150

155-
- @TODO
151+
- No project files were changed in this release.

0 commit comments

Comments
 (0)