Index: openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl,v diff -u -r1.30.2.18 -r1.30.2.19 --- openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl 14 Jan 2021 21:35:43 -0000 1.30.2.18 +++ openacs-4/packages/acs-tcl/tcl/http-client-procs.tcl 11 Mar 2021 10:46:39 -0000 1.30.2.19 @@ -522,18 +522,14 @@ set this_proc [lindex [info level 0] 0] # Retrieve variables sent by the URL... - set vars [lindex [split $url ?] 1] - foreach var [split $vars &] { - set var [split $var =] - set key [lindex $var 0] - set urlvars($key) 1 + set parsed [ns_parseurl $url] + if {[dict exists $parsed query]} { + array set urlvars [ns_set array [ns_parsequery [dict get $parsed query]]] } # Check whether we don't have multiple variable definition in url # and payload. - foreach var [split $formvars &] { - set var [split $var =] - set key [lindex $var 0] + foreach {key value} [ns_set array [ns_parsequery $formvars]] { if {[info exists urlvars($key)]} { return -code error "${this_proc}: Variable '$key' already specified as url variable" } @@ -662,10 +658,7 @@ } # Translate urlencoded vars into multipart variables - foreach formvar [split $formvars &] { - set formvar [split $formvar =] - set key [lindex $formvar 0] - set val [join [lrange $formvar 1 end] =] + foreach {key val} [ns_set array [ns_parsequery $formvars]] { set val [ad_urldecode_query $val] if {[info exists filevars($key)]} { Index: openacs-4/packages/xooauth/www/admin/lti-test.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xooauth/www/admin/lti-test.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/xooauth/www/admin/lti-test.tcl 6 Dec 2020 09:02:11 -0000 1.1.2.1 +++ openacs-4/packages/xooauth/www/admin/lti-test.tcl 11 Mar 2021 10:54:36 -0000 1.1.2.2 @@ -138,8 +138,7 @@ ## Add potential GET parameters from the launch url to the signature parameters array set uri [uri::split $launch_url] - foreach pair [split $uri(query) &] { - lassign [split $pair =] key value + foreach {key value} [ns_set array [ns_parsequery $uri(query)]] { lappend signature_parameters [list [ns_urldecode $key] [ns_urldecode $value]] }