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

Problem

Unprotected mass assignment

Location

app/controllers/admin/users_controller.rb:309

User.find_by(:id => params[:user_id]).email_tokens.create(:email => User.find_by(:id => params[:user_id]).email)

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/controllers/admin/users_controller.rb or mark it as false positive.