Highlighted
Contributor.. Contributor..
Contributor..
76 views

Unable to use a saved parameter value

Jump to solution

Hello, need some help here. I am saving a value using web_save_param_regexp:

web_reg_save_param_regexp(
"ParamName=SAMLRequest",
"RegExp=name=\"SAMLRequest\"\\ value=\"(.*?)\"/><input\\ type",
SEARCH_FILTERS,
"Scope=Body",
"IgnoreRedirections=Yes",
"RequestUrl=*signin.aspx*",
LAST);

Using the lr_output_message, I"m able to view that I have the correct value and went to https://www.base64decode.org/ to decode it and I see it is correct

However, next step is a web_custom_request using this parameter:

web_custom_request("LoginRequest",
"URL=https://url-labhs.com/LoginRequest",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=https://lab.ca/signin.aspx?appid=232f5ba9-6cbb-4528-b0b5-755e29d030ac&lcid=4105&redirect=https%3a%2f%2labhs.ca%2fRedirect.aspx&aib=true&trm=post",
"Snapshot=t20.inf",
"Mode=HTTP",
"Body=SAMLRequest={SAMLRequest}",
LAST);

and it does not work, I always have the same error : 

Location: /Error?errorMessage=Failed to convert saml message posted form from base 64 encoded string.Invalid length for a Base-64 char array or string.

Any clue ? Any Replay parameter settings I can change to fix that ? 

Any help is much appreciated! Thank you!

 

 

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Contributor.. Contributor..
Contributor..

it finally worked, I used a more recent version of LR and I don't have this issue anymore! 

Thank you for you reply

Nathalie

View solution in original post

0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

What's the expected form of http body of the login request? You can compare what you sent to the body in the browser.

0 Likes
Highlighted
Contributor.. Contributor..
Contributor..

it finally worked, I used a more recent version of LR and I don't have this issue anymore! 

Thank you for you reply

Nathalie

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.