Fifth beta of the phpwcms 2.x line.
🔒 Security
- Form upload extension check: the public Form upload validated the extension of the raw multipart name but stored
sanitize_filename()of it. A name such asmarker.php.had no extension for the deny list, while the cleaning removed the trailing dot and wrote<time>_marker.phpinto the web-servedcontent/form/folder. The PHP opening tag scan read only the first 8192 bytes, andcontent/form/.htaccessis inert when the web server runs withAllowOverride None(the stock Debian Apache default), so that file could execute. The extension check and both accept/exclude regexps now run against the stored file name, the deny list also coversphp2,php6,php9,shtmlandshtm, the tag scan reads the whole file in chunks, and the stored name carries a random component so it is no longer derivable from the response time. - Revision
r563quarantines uploads that are already stored with an executable extension. Files are moved, not deleted: they are renamed with a.quarantinesuffix intocontent/tmp/.form-upload-quarantine/<timestamp>/, the result is reported in the update output, and that folder denies web access. Review it after updating and restore anything legitimate.
✨ Added
- Installation-owned config files:
include/config/{conf.indexpage.inc.php,conf.template_default.inc.php,feeds.ini.php,sitemap.custom.ini,sitemap.custom.php,iptc.inc.php}belong to the installation now. Only theirdist.*templates are tracked, shipped and replaced by an update; the setup wizard seeds copies of the five editable files,iptc.inc.phpstays optional, and a missing required file falls back to itsdist.*template throughphpwcms_user_config_path().
🛠️ Changed
- Release packages:
build/make-release.shno longer ships the installation-owned config files and aborts when one reaches the staging directory.include/config/custom_settings.php, a cmsGo! leftover that no code loaded, is removed. - Upgrade script: the post-upgrade revision run bootstraps
PHPWCMS_ROOT,PHPWCMS_TEMPand the database connection itself, skips with a logged reason when the table prefix does not match, and reports skipped revisions in the web log instead of "completed".
🐛 Fixed
- Index page template reset on update: a database revision used to seed the index page row from a release-shipped
conf.indexpage.inc.php, which a file deploy had overwritten with the dist default, resetting the index page template (GH #397). Revisionr562reads only the installation's own file, keeps the previously selected template, and verifies the stored template ID.
Requires PHP 8.4+.