Discovered 5 months ago
Source: static code analysis
Category: Mass Assignment
Confidence level: Weak

Problem

Unprotected mass assignment

Location

app/models/user.rb:1226

UserAvatar.create!(:user_id => id, :custom_upload_id => SiteSetting.selectable_avatars.sample.id)

Category description: Unprotected model attributes give the attacker a way to rewrite them. E.g., change the admin flag to true.

Solution: fix the issue in app/models/user.rb or mark it as false positive.