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

Problem

Unprotected mass assignment

Location

app/controllers/topics_controller.rb:311

SharedDraft.create(:topic_id => Topic.find_by(:id => params[:id]).id, :category_id => Category.where(:id => params[:category_id].to_i).first.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/controllers/topics_controller.rb or mark it as false positive.