Skip to content

Conversation

@Jearnest94
Copy link
Contributor

Fix so you can't download a users hashed password

Fix so you can't download a users hashed password
Copilot AI review requested due to automatic review settings December 17, 2025 09:45
Copy link

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 adds a security fix to the ActivitySprunje class to prevent user password hashes from being exposed through the activities API. When activities are joined with user data, only explicitly whitelisted columns are now returned, excluding sensitive fields like password hashes.

Key Changes

  • Added a $columns property to ActivitySprunje that whitelists safe columns from both the activities and users tables
  • Ensures password hashes and other potentially sensitive user fields are not exposed when querying activities

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lcharette lcharette merged commit ed01f68 into userfrosting:5.1 Dec 18, 2025
11 checks passed
@lcharette
Copy link
Member

I merged it for V5 as a quick fix, but I think it doesn't fully solve it. Any other Sprunje with a left join might include the sensitive data. It's not included when the JSON is returned as this one invoke the model "hidden" part. So I think CSV should call "toArray" in the background instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants