Use `URLEncoder#encode` instead of `encodeURIComponent`, e.g.:
var URLEncoder = Java.type('java.net.URLEncoder');
print(URLEncoder.encode("Password1!", "UTF8"))
Best regards.
On 02/03/2022 13:46, Charles Williams wrote:
> Hello,
>
> I think I figured out my issue, but I have one last question regarding
> login. So I've created my test user with username Testusercw and password
> Password1!, the POST message body looks like this on a successful login
> (note the blank credentialId is intentional):
>
> *username=Testusercw&password=Password1%21&credentialId=*
>
> However, my debug messages are showing me that the following body is being
> used to login:
>
> *username=Testusercw&password=Password1!&credentialId=*
>
> It looks like the HTML URL encoding is not being applied, so I tried
> changing the test user's password to Password1%21, but got this in my debug
> log instead:
>
> *username=Testusercw&password=Password1%2521&credentialId=*