This repository was archived by the owner on Oct 19, 2026. It is now read-only.
Repository navigation
PHPDB Security Patch Notes
This package contains a hardened phpdb.php with the following changes:
Hardening changes
- Cipher allow-list: configuration can no longer downgrade OpenSSL ciphers. Only
AES-256-CBCis accepted; invalid values fall back safely and are audit-logged. - Path policy for imports: by default, imports are restricted to a dedicated folder under
base_dir(defaultimports/). Override withallow_import_outside_base=trueif you really need it. - Base directory web-access protection: base directory is automatically passed through
secureDatabase()to write deny rules (best-effort). - Safer canonical path checks: base-dir restriction check is boundary-safe.
- Strict base64 decoding: legacy v1 key decode is now strict and fails closed.
- Atomic/locked export writes: export files are written with
LOCK_EX. - secureDatabase() reliability: will create the target directory when locking so
realpath()works.
New optional phpdb.json keys
{
"import_dir": "imports",
"allow_import_outside_base": false
}Note: No functional changes were made to the v2 on-disk format.