From 4cb2eadd7a2953d0637020cd6774ca392b3a04ff Mon Sep 17 00:00:00 2001 From: "G. Gibson" Date: Sun, 30 Mar 2025 12:49:28 -0700 Subject: [PATCH] uri-unescape bug fix 3 --- Services/www/www/gxg-www.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Services/www/www/gxg-www.rb b/Services/www/www/gxg-www.rb index d7cbb7a..ce2ae88 100644 --- a/Services/www/www/gxg-www.rb +++ b/Services/www/www/gxg-www.rb @@ -849,15 +849,16 @@ module GxGwww # operations = [] the_parser = URI::Parser.new + triple_parse = Proc.new {|the_string| the_parser.unescape(the_parser.unescape(the_parser.unescape(the_string)))} case the_method when :get if the_request.params["details"].to_s.size > 0 - operations = (::JSON::parse( the_parser.unescape(the_parser.unescape(the_parser.unescape(the_request.params["details"].to_s.decode64)) ) ), {:symbolize_names => true}) + operations = ::JSON::parse( triple_parse.call(the_request.params["details"].to_s.decode64), {:symbolize_names => true} ) end when :put if the_request.body.respond_to?(:rewind) && the_request.body.respond_to?(:read) the_request.body.rewind - operations = (::JSON::parse( the_parser.unescape(the_parser.unescape(the_parser.unescape(the_request.body.read))) ), {:symbolize_names => true}) + operations = ::JSON::parse( triple_parse.call(the_request.body.read), {:symbolize_names => true} ) else log_warn("Abnormal PUT Body #{the_request.body.inspect}") end