Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:tests:safezipextracttest

This is an old revision of the document!


tests/unit/SafeZipExtractTest.php

Source: tests/unit/SafeZipExtractTest.php · 214 lines, ~1143 statements · namespace: (global) · `declare(strict_types=1)`: no


Unit tests for safe_zip_extract() — the canonical safe ZIP extraction used by

the theme and plugin uploaders (RCE F2/F8 remediation).

Covers the happy path plus the zip-slip class of bugs: “../” traversal, Windows-style “..\” traversal, absolute paths, and the escape guard. Also verifies skip patterns are honoured.

Imports

^ Alias ^ Fully-qualified name ^
| ''TestCase'' | ''PHPUnit\Framework\TestCase'' |

Constants

^ Name ^ Value / expression ^ Line ^
| ''('SCRIPTLOG', true'' | ''define('SCRIPTLOG', true)'' | 1 |

Types declared here


Generated by 'tools/gendoc'.

scriptlog/tests/safezipextracttest.1790413766.txt.gz · Last modified: by admin