From 64af2816a3f788c360434a73a234d41ef4c9f66e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 16 May 2024 17:48:48 +0100 Subject: [PATCH] Treat the body as UTF-8 for user_preferences#update --- app/controllers/api/user_preferences_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/user_preferences_controller.rb b/app/controllers/api/user_preferences_controller.rb index 02a23095a..99d224c51 100644 --- a/app/controllers/api/user_preferences_controller.rb +++ b/app/controllers/api/user_preferences_controller.rb @@ -66,7 +66,7 @@ module Api pref.k = params[:preference_key] end - pref.v = request.raw_post.chomp + pref.v = request.raw_post.chomp.force_encoding("UTF-8") pref.save! render :plain => "" -- 2.39.5