|
1 | 1 | # Changelog |
2 | 2 |
|
| 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 | + |
3 | 78 | ## [v4.7.5](https://github.com/codeigniter4/CodeIgniter4/tree/v4.7.5) (2026-10-09) |
4 | 79 | [Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.7.4...v4.7.5) |
5 | 80 |
|
|
0 commit comments