Third beta of the phpwcms 2.x line.
🔒 Security
- PHP injection via translation tokens (GHSA-xw8p-7592-hg99):
@@Text@@entries are written withvar_export()instead of hand-made escaping. Tokens containing control characters or more than 1024 characters are rejected, and generated language files stop receiving entries above 1 MiB. Both limits are configurable throughi18n_token_max_lengthandi18n_lang_file_max_size. After upgrading, inspect and delete poisoned files intemplate/template_lang/— the advisory has the exact commands. - Setup config writer:
write_conf_file()emits string values withvar_export(); the localescape_quote()helper is removed.
✨ Added
- Index page as article category: the index page is the regular article category row
acat_id = 0, editable and orderable like any other category. Revisionr562seeds the row for existing installations;conf.indexpage.inc.phpstays a fallback and readable mirror. - Native AVIF and WebP support: both formats can be uploaded, processed and used like JPEG or PNG; image extension integrity checks cover them.
- Required PHP extensions enforced: setup and the updater verify the extensions listed in
composer.jsonand abort before changing files or the database. Setup now requires PHP 8.4, matching the Composer platform check. clean_plain_utf8()helper for UTF-8 and JSON output paths.- Docker:
bcmathinstalled in the web image.
🛠️ Changed
- voku/portable-utf8 modernization: charset converters,
strip_tags()wrappers and entity decoding in core and setup use the UTF-8 helpers; URL alias and slug generation is rebuilt on the same library. The legacyConvertCharsetclass is dropped. - voku/anti-xss filtering for XSS cleanup.
- Image zoom:
image_zoom.phpmodernized, ships its recommended CSS, addslangto the HTML tag. - Duplicate definitions removed, obsolete
function_exists()guards dropped.
🐛 Fixed
- Filebrowser 500 on upload: missing Tom Select assets included, file tags passed through a hidden input,
file_tags,file_longinfoandfile_copyrightsanitized against literalundefined. Fixes #394. - PHP 8.5 deprecations:
$http_response_headerreplaced withhttp_get_last_response_headers();imagedestroy(),finfo_close()andcurl_close()replaced withunset(); dynamicFeedItem::$updateDatewrite removed. - Forms, Markdown and replacers: custom form anchors honored,
parse_markdown()passes UTF-8 to CommonMark, captured{IMAGE*}/{RANDOM_*}values escaped. - Legacy IPTC charset: data without a 1:90 tag is decoded as Windows-1252 instead of the deprecated
utf8_encode(). - Deprecated replacers hardened, no notices.
📦 Dependency Updates
- Composer:
phpmailer/phpmailer7.2.0,phpoffice/phpspreadsheet5.11.0,tinymce/tinymce8.10.2,netcarver/textile4.1.9,guzzlehttp/psr72.13.3, currentsimplepie/simplepieandroave/security-advisoriessnapshots.
Requires PHP 8.4+ and MySQL 5.5+ / MariaDB. Ships database revision r562.