Skip to content

Fix SQL injection in EditEventAttendees and improve UX#7665

Closed
DawoudIO wants to merge 4 commits intomasterfrom
fix/7252-edit-event-attendees-sql-injection
Closed

Fix SQL injection in EditEventAttendees and improve UX#7665
DawoudIO wants to merge 4 commits intomasterfrom
fix/7252-edit-event-attendees-sql-injection

Conversation

@DawoudIO
Copy link
Contributor

What Changed

  • Fix CVE-2025-1133: Replace raw SQL DELETE with Propel ORM parameterized query
  • Sanitize all POST/GET inputs using InputUtils::legacyFilterInputArr()
  • Add EventAttendQuery import for type-safe database operations
  • Add 'Check In People' navigation button linking to event check-in form
  • Improve table styling with Bootstrap classes (table-sm table-striped)
  • Add proper null checks and type casting for database values
  • Prevent SQL injection vulnerabilities in event attendee deletion

Fix #7252

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)

- Fix CVE-2025-1133: Replace raw SQL DELETE with Propel ORM parameterized query
- Sanitize all POST/GET inputs using InputUtils::legacyFilterInputArr()
- Add EventAttendQuery import for type-safe database operations
- Add 'Check In People' navigation button linking to event check-in form
- Improve table styling with Bootstrap classes (table-sm table-striped)
- Add proper null checks and type casting for database values
- Prevent SQL injection vulnerabilities in event attendee deletion"
@DawoudIO DawoudIO added this to the 6.3.0 milestone Nov 29, 2025
Copilot AI review requested due to automatic review settings November 29, 2025 17:09
@DawoudIO DawoudIO requested a review from a team as a code owner November 29, 2025 17:09
@DawoudIO DawoudIO requested review from DAcodedBEAT, MrClever, bigtigerku, grayeul and respencer and removed request for a team November 29, 2025 17:09
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 PR fixes CVE-2025-1133, a SQL injection vulnerability in the event attendee deletion functionality. The changes replace raw SQL queries with Propel ORM parameterized queries and improve input sanitization throughout the file. Additionally, UX enhancements include a new "Check In People" navigation button and improved table styling.

Key Changes:

  • Replaced vulnerable raw SQL DELETE with Propel ORM EventAttendQuery for safe, parameterized deletion
  • Migrated all input handling from direct $_POST/$_GET access to InputUtils::legacyFilterInputArr()
  • Converted attendee listing from raw SQL to Propel ORM with proper joins and relationships

Comment on lines +96 to +100
$sHomePhone = SelectWhichInfo(
ExpandPhoneNumber($person->getPerHomephone(), $sPhoneCountry, $dummy),
ExpandPhoneNumber($family ? $family->getFamHomePhone() : null, $famCountry, $dummy),
true
);
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

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

Variable $dummy is used but never defined, passed as a reference parameter to ExpandPhoneNumber. This will cause a PHP warning about undefined variables.

Define the variable before use:

$dummy = '';
$sPhoneCountry = SelectWhichInfo($person->getPerCountry(), $famCountry, false);
$sHomePhone = SelectWhichInfo(
    ExpandPhoneNumber($person->getPerHomephone(), $sPhoneCountry, $dummy),
    ExpandPhoneNumber($family ? $family->getFamHomePhone() : null, $famCountry, $dummy),
    true
);

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

DawoudIO and others added 3 commits November 29, 2025 09:20
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Nov 29, 2025

@DawoudIO I've opened a new pull request, #7666, to work on those changes. Once the pull request is ready, I'll request review from you.

@DawoudIO
Copy link
Contributor Author

I'm going to kill this page so no need for this PR

@DawoudIO DawoudIO closed this Nov 29, 2025
@DawoudIO DawoudIO deleted the fix/7252-edit-event-attendees-sql-injection branch December 19, 2025 01:25
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.

3 participants