Skip to content

A platform for community discussion. Free, open, simple.

DEV: remove another deprecation notice when serializing args (#31240)

Régis Hanol85e82e7be3ce
diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb
index 97112c331e7..b113865b9bc 100644
--- a/app/controllers/posts_controller.rb
+++ b/app/controllers/posts_controller.rb
@@ -229,7 +229,7 @@ class PostsController < ApplicationController
raise Discourse::NotFound if post.blank?
- post.image_sizes = params[:image_sizes] if params[:image_sizes].present?
+ post.image_sizes = params[:image_sizes].permit!.to_h if params[:image_sizes].present?
if !guardian.public_send("can_edit?", post) && post.user_id == current_user.id &&
post.edit_time_limit_expired?(current_user)