Taint-analysis precision for static where()/whereNot() calls and redirect responses (Psalm 6 line), ported from the paired v4.15.3 release.
Fixes
- Fix
TaintedSqlfalse positives and a false negative onwhere()/whereNot()static receivers and nested-condition array values (#1300).
class ConcreteOverrideModel extends Model {
/** @psalm-taint-sink sql $column */
public static function where(mixed $column): void {}
}
$term = (string) $request->input('term');
-ConcreteOverrideModel::where([['name', '=', $term]]); // silent (false negative, own sink stripped)
+ConcreteOverrideModel::where([['name', '=', $term]]); // TaintedSql
Article::where([['name', '=', $request->keyword]]);
-// TaintedSql (false positive) -- mixed value failed the outer position's scalar gate
+// clean -- inner nested-condition value strips unconditionally on a real Model receiver- Fix
TaintedSSRFfalse positive onredirect()andRedirect/ResponseFactoryredirect responses. A redirect is a header/open-redirect sink, not a server-side request, so it now reports the correct sink kind (#1313).
-return redirect($request->input('next')); // TaintedSSRF (wrong sink kind)
+return redirect($request->input('next')); // TaintedHeaderFull Changelog: v3.15.2...v3.15.3