Repository navigation
XMF 1.3.4 Beta1
Pre-release
Pre-release
XMF 1.3.4 Beta 1
A security-hardening pre-release for the PHP 8.2+ line (^8.2, tested on 8.2–8.5). It closes filtering bypasses, a SQL identifier injection surface, several denial-of-service paths and an HTML-injection gap in Highlighter. There are no new features. A few methods now reject input they used to accept, so check Upgrade notes before you deploy.
This is a beta: please test it against your modules and report regressions at https://github.com/XOOPS/xmf/issues.
Upgrade notes (behaviour changes)
Database\Tables::executeQueue()refuses unforced writes on GET requests again (coreallowWebChangesfalse), as it did before 1.3.1. Migrations that run from a GET page must callexecuteQueue(true).Database\Tables/TableLoadquote every table, column and index name with backticks. A name that is not a string or int throwsInvalidArgumentException. An index prefix length must be numeric (name(20)).Database\MigratethrowsSchemaDefinitionExceptionfor an empty key column entry.FilterInputWEBURLrejects more values: backslashes, entity-hidden schemes (javascript:),http/httpsURLs with no host, and authorities containing&or%. Values that were never valid URLs in a browser's reading may now come back empty.FilterInputarrays are filtered at every depth. Arrays nested deeper than 32 levels are dropped.Security\Serializer::toJson()rejects data whose JSON form would exceed 5,000,000 bytes.Module\Helper::getHandler()accepts only names made of letters, digits and_.Debug::startTrace()refuses to start when the installed Xdebug cannot honour the requested$collect_params/$collect_returnsettings, rather than recording more than you asked for.Yaml::read()/readWrapped()stop at 2 MB of data read, not just reported file size.
Security
- FilterInput
- Nested array values are filtered (they were returned unfiltered).
clean()uses the calling class's own instance, so a subclass's policy no longer leaks into laterFilterInput::clean()andRequestcalls.WEBURLreads the scheme the way a browser does.javascript:1/alert(1)anddata:80/...are rejected, as is//host(decodes to//host) (#200).- Tag filtering runs in linear time. A ~1.4 MB value used to take over 20 seconds per pass (#203).
- SQL identifiers.
TablesandTableLoadquote caller-supplied names.TableLoad::countRows()/extractRows()/truncateTable()andTables::dropIndexes()used to pass them through unquoted.INFORMATION_SCHEMAlookups use string literals (#201). - Serializer.
toJson()budgets the encoded size before callingjson_encode(). This counts shared references,JsonSerializableresults, string bytes, keys, backed enums,ArrayObject/ArrayIteratorcontents and PHP 8.4 property-hook values. A few hundred bytes of crafted serialized data could exhaust memory before (#204, #208). - Highlighter
- SendmailRunner. A symlinked sendmail path runs only when every parent directory is owned by root or the PHP user and is not group- or world-writable. Otherwise the validated canonical target runs (#204).
- Module\Helper.
getHandler()can no longer include PHP files outside the module'sclass/directory (#204). - Debug.
startTrace()fails closed instead of tracing full parameter or return values against the caller's request (#204, #208). - SerializableTrait. Control characters are escaped in migration failure logs, so one failure is one log line (#204).
- Metagen.
getSearchSummary()searches duplicate terms once (#204).
Bug fixes
Highlighter::apply(): empty search terms no longer loop until memory runs out.Debug: first use no longer re-enables Kint after the application disabled it.Database\TableLoad::countRows()returns 0 on a failed query instead of raising a warning.Database\Migrate:- Key column lists are normalized to the form
getTableIndexes()reports, so unchanged indexes are no longer dropped and recreated on every run. - Column names containing a double quote survive the CSV round trip.
- Key column lists are normalized to the form
Database\Tables::addPrimaryKey()accepts a prefix length (code(8)), likeaddIndex().
Infrastructure
- CI:
shivammathur/setup-php2.40.0 (#199),SonarSource/sonarqube-scan-action8.4.0 (#202). FileStorageTestuses a private temp directory.
Pull requests
#199, #200, #201, #202, #203, #204, #208
Full Changelog: v1.3.3...v1.3.4-Beta1