github slackero/phpwcms v2.0.0-beta.5
phpwcms v2.0.0-beta.5

pre-releaseone hour ago

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 as marker.php. had no extension for the deny list, while the cleaning removed the trailing dot and wrote <time>_marker.php into the web-served content/form/ folder. The PHP opening tag scan read only the first 8192 bytes, and content/form/.htaccess is inert when the web server runs with AllowOverride 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 covers php2, php6, php9, shtml and shtm, 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 r563 quarantines uploads that are already stored with an executable extension. Files are moved, not deleted: they are renamed with a .quarantine suffix into content/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 their dist.* templates are tracked, shipped and replaced by an update; the setup wizard seeds copies of the five editable files, iptc.inc.php stays optional, and a missing required file falls back to its dist.* template through phpwcms_user_config_path().

🛠️ Changed

  • Release packages: build/make-release.sh no 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_TEMP and 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). Revision r562 reads only the installation's own file, keeps the previously selected template, and verifies the stored template ID.

Requires PHP 8.4+.

Don't miss a new phpwcms release

NewReleases is sending notifications on new releases.