User tests: Successful: Unsuccessful:
Pull Request resolves #48158.
Credit to @CyrusXxXxX for reporting and documenting the original issue.
CMSApplication::getUserStateFromRequest() now infers whether arrays are
expected from the caller's default and explicit filter.
array, raw, or none filterslibraries/vendor/bin/phpunit tests/Unit/Libraries/Cms/Application/CMSApplicationTest.phplimit[]=5, then confirm scalar global.list.limit state is not replacedValidation performed locally:
git diff --check: passAn array request filtered as uint remains an array because Joomla Framework's
input filter recursively filters array values. The application persists that
array into scalar session state such as global.list.limit.
Scalar user state remains scalar. Array input is ignored for scalar state, and
already poisoned state is repaired to the caller's scalar default. Callers that
intentionally expect arrays retain their existing behavior.
Please select:
No documentation changes for guide.joomla.org needed
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries Unit Tests |
| Labels |
Added:
Unit/System Tests
PR-5.4-dev
|
||