Skip to content

Commit

Permalink
[BUG] Exception 29/08/2024 at 10:42
Browse files Browse the repository at this point in the history
Using params from ActionController::Parameters before permitting them
  • Loading branch information
sabrine33 committed Oct 8, 2024
1 parent 1aecaea commit 147e531
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/barcode_labels_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def create
private

def generate_labels
@labels = (params[:numbers] || []).map do |_, number|
permitted_params = params.permit(:prefix, :study, :numbers)
@labels = (permitted_params[:numbers] || []).map do |_, number|
BarcodeSheet::Label.new(
prefix: params[:prefix],
number:,
Expand Down

0 comments on commit 147e531

Please sign in to comment.