[5.4] [AI] Prevent arrays from poisoning scalar user state #48170
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 282 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.338
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #48170"
general
weight: 0.35
carrerasdarren-cell
Pull Request resolves #48158.
Credit to @CyrusXxXxX for reporting and documenting the original issue.
Summary of Changes
CMSApplication::getUserStateFromRequest()now infers whether arrays areexpected from the caller's default and explicit filter.
array,raw, ornonefilterskeep their existing array behavior.
scalar input, and intentional recursively filtered arrays.
Testing Instructions
1. Run:
libraries/vendor/bin/phpunit tests/Unit/Libraries/Cms/Application/CMSApplicationTest.php2. Confirm all four tests and eight assertions pass.
3. Optionally request a core list view with an array parameter such as
limit[]=5, then confirm scalarglobal.list.limitstate is not replacedby an array.
Validation performed locally:
git diff --check: passActual result BEFORE applying this Pull Request
An array request filtered as
uintremains an array because Joomla Framework'sinput filter recursively filters array values. The application persists that
array into scalar session state such as
global.list.limit.Expected result AFTER applying this Pull Request
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.
Link to documentations
Please select: