Prevent mass assignment vulnerability

pull/1925/head
slawa 10 years ago
parent e48649fded
commit f8b09545ed
  1. 3
      app/controllers/copy_projects_controller.rb

@ -37,7 +37,8 @@ class CopyProjectsController < ApplicationController
def copy def copy
target_project_name = params[:project][:name] target_project_name = params[:project][:name]
@copy_project = Project.new(params[:project]) @copy_project = Project.new
@copy_project.safe_attributes = params[:project]
if @copy_project.valid? if @copy_project.valid?
copy_project_job = CopyProjectJob.new(User.current, copy_project_job = CopyProjectJob.new(User.current,

Loading…
Cancel
Save