From 886984096e268135eecfef38f9aaf693e658b464 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Tue, 15 Mar 2022 15:52:13 +0100 Subject: [PATCH] Replace URI.unescape with CGI.unescape See https://github.com/ruby/uri/commit/61c6a47ebf1f2726b60a2bbd70964d64e14b1f98 --- src/api/app/controllers/group_controller.rb | 2 +- src/api/app/controllers/person_controller.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/app/controllers/group_controller.rb b/src/api/app/controllers/group_controller.rb index 647038c11f01..58a5b431b1ae 100644 --- a/src/api/app/controllers/group_controller.rb +++ b/src/api/app/controllers/group_controller.rb @@ -64,7 +64,7 @@ def update # POST for editing it, adding or remove users def command - group = Group.find_by_title!(URI.unescape(params[:title])) + group = Group.find_by_title!(CGI.unescape(params[:title])) authorize group, :update? user = User.find_by_login!(params[:userid]) if params[:userid] diff --git a/src/api/app/controllers/person_controller.rb b/src/api/app/controllers/person_controller.rb index d1e61eff88d5..406ace073828 100644 --- a/src/api/app/controllers/person_controller.rb +++ b/src/api/app/controllers/person_controller.rb @@ -226,9 +226,9 @@ def change_my_password login = xml.elements['/userchangepasswd/login'].text password = xml.elements['/userchangepasswd/password'].text - login = URI.unescape(login) + login = CGI.unescape(login) - change_password(login, URI.unescape(password)) + change_password(login, CGI.unescape(password)) render_ok end