Open michaelhogg opened 3 years ago
Hey @michaelhogg, thanks for your detailed bug report. I love it ๐
I will check it out to make sure the Scripting is able to parse the unencoded square brackets and send you a BETA build this week ๐
@michaelhogg Please check out this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.19.0_Fix_URL_Scripting.dmg
Please let me know if it works for you ๐
Hey @NghiaTranUIT! :wave: Wow that was a quick response! :smiley:
Thank you so much for implementing a fix and sending me that beta build :star2: I can confirm that my test URL (with the unencoded square brackets) is now working! :white_check_mark:
https://deliver.kenticocloud.com/5ac93d1e-567d-01e6-e3b7-ac435f77b907/items?system.id[eq]=a5f68d0f-6c6c-4845-b4d4-6bda702f0c1c
function onResponse(context, url, request, response) {
console.log('response.statusCode = ' + response.statusCode);
console.log('url = ' + url);
return response;
}
----------------------------------
19:08:21.029: [onResponse] with Request ID=41
response.statusCode = 200
url = https://deliver.kenticocloud.com/5ac93d1e-567d-01e6-e3b7-ac435f77b907/items?system.id[eq]=a5f68d0f-6c6c-4845-b4d4-6bda702f0c1c
19:08:21.033 onResponse() is executed!
I really appreciate you fixing this bug so quickly โ thank you! :1st_place_medal: :tada:
Proxyman is really awesome and I've just purchased a license today :slightly_smiling_face:
Wow. Thank you @michaelhogg so much for supporting Proxyman Team โค๏ธ ๐ฎ
Feel free to ping us if you find any problems ๐
Proxyman version? (Ex. Proxyman 1.4.3)
2.19.0 (21900)
macOS Version? (Ex. mac 10.14)
10.14.3
Steps to reproduce
deliver.kenticocloud.com
:Tools
menu >SSL Proxying List
.Enabled SSL Proxying Tool
checkbox.deliver.kenticocloud.com
to theInclude List
.deliver.kenticocloud.com
:Scripting
menu >Script List
URL
=*deliver.kenticocloud.com*
GET
Use Wildcard
Include all subpaths of this URL
checkbox uncheckedRun Script on
=Response
onlySave & Activate
button.Console
button to open the Scripting Console.Expected behavior
The Scripting Console should display:
Screenshot
Further details
If I remove
[eq]
from the URL:and then load this modified URL in Chrome, the Scripting Console displays the expected output:
So it seems to be the
[eq]
querystring parameter in square brackets which is causing theCouldn not build JSObject with URL
error :x:There is some discussion online about whether square brackets should be percent-encoded (
[]
encoded as%5B%5D
) to make a valid URL:As an example, the Kentico Kontent Delivery API expects unencoded square brackets:
system.type[eq]=article
elements.price[lt]=10
elements.price[range]=10.5,50
So I think Proxyman's Scripting Tool needs to be able to support unencoded square brackets in querystring parameters, without crashing with the
Couldn not build JSObject with URL
error.