Skip to content

Commit 0512ee8

Browse files
committed
Update User Guide
1 parent 50e7e54 commit 0512ee8

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

changelogs/v4.7.4.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,21 @@ <h2><a class="toc-backref" href="#id1" role="doc-backlink">SECURITY</a><a class=
330330
sanitized and remains the caller’s responsibility.
331331
See the <a class="reference external" href="https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-hhmc-q9hp-r662">Security advisory GHSA-hhmc-q9hp-r662</a>
332332
for more information.</p></li>
333+
<li><p><strong>Validation:</strong> The <code class="docutils literal notranslate"><span class="pre">is_image</span></code> and <code class="docutils literal notranslate"><span class="pre">mime_in</span></code> file upload validation rules
334+
now also verify non-empty client filename extensions. Previously, these rules
335+
classified an upload solely by its content-derived MIME type, so a file with a
336+
dangerous client extension (for example, a <code class="docutils literal notranslate"><span class="pre">.php</span></code> file prepended with image
337+
magic bytes) could pass validation while keeping its original extension on
338+
disk.
339+
See the <a class="reference external" href="https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-mmj4-63m4-r6h5">Security advisory GHSA-mmj4-63m4-r6h5</a>
340+
for more information.</p>
341+
<p>The <code class="docutils literal notranslate"><span class="pre">is_image</span></code> rule now rejects uploads when a non-empty client filename
342+
extension is not an image extension. The <code class="docutils literal notranslate"><span class="pre">mime_in</span></code> rule now rejects uploads
343+
when a non-empty client filename extension does not match the detected file
344+
content, matching the same extension/content agreement used by <code class="docutils literal notranslate"><span class="pre">ext_in</span></code>.
345+
Files uploaded without any extension (such as JavaScript <code class="docutils literal notranslate"><span class="pre">Blob</span></code> uploads)
346+
are still accepted, since the rules validate the file content.</p>
347+
</li>
333348
</ul>
334349
</section>
335350
<section id="breaking">

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)