Skip to content

Fix SQL injection vulnerability in WhichType parameter#7691

Merged
DawoudIO merged 2 commits intomasterfrom
fix/sql-injection-listevents-whitype
Nov 30, 2025
Merged

Fix SQL injection vulnerability in WhichType parameter#7691
DawoudIO merged 2 commits intomasterfrom
fix/sql-injection-listevents-whitype

Conversation

@DawoudIO
Copy link
Contributor

What Changed

Use InputUtils::filterInt() instead of legacyFilterInput() to properly sanitize the WhichType POST parameter. This ensures only integer values are accepted when filtering events by type, preventing SQL injection attacks in the event listing page.

Type

  • ✨ Feature
  • 🐛 Bug fix
  • ♻️ Refactor
  • 🏗️ Build/Infrastructure
  • 🔒 Security

Testing

Screenshots

Security Check

  • Introduces new input validation
  • Modifies authentication/authorization
  • Affects data privacy/GDPR

Code Quality

  • Database: Propel ORM only, no raw SQL
  • No deprecated attributes (align, valign, nowrap, border, cellpadding, cellspacing, bgcolor)
  • Bootstrap CSS classes used
  • All CSS bundled via webpack

Pre-Merge

  • Tested locally
  • No new warnings
  • Build passes
  • Backward compatible (or migration documented)

Use InputUtils::filterInt() instead of legacyFilterInput() to properly
sanitize the WhichType POST parameter. This ensures only integer values
are accepted when filtering events by type, preventing SQL injection
attacks in the event listing page.
@DawoudIO DawoudIO added this to the 6.3.0 milestone Nov 30, 2025
Copilot AI review requested due to automatic review settings November 30, 2025 06:38
@DawoudIO DawoudIO requested a review from a team as a code owner November 30, 2025 06:38
@DawoudIO DawoudIO requested review from DAcodedBEAT, MrClever, bigtigerku, grayeul and respencer and removed request for a team November 30, 2025 06:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This security-focused PR fixes a SQL injection vulnerability in the event listing page by replacing InputUtils::legacyFilterInput() with InputUtils::filterInt() for the WhichType parameter. The change ensures only integer values are accepted when filtering events by type, preventing potential SQL injection attacks.

Key Changes

  • Switched from legacyFilterInput() to filterInt() for sanitizing the WhichType POST parameter
  • Added an explicit check for the 'All' value to handle the special case where no type filter is applied
  • Maintains backward compatibility by preserving the 'All' type option behavior

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DawoudIO DawoudIO merged commit ce432e4 into master Nov 30, 2025
6 checks passed
@DawoudIO DawoudIO deleted the fix/sql-injection-listevents-whitype branch November 30, 2025 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants