HomeSUPPORT QUESTIONS

Need help with StresStimulus? Start here.

Extraction from a response and substitution in request gets double encoded Messages in this topic - RSS

Sundara J
Sundara J
Posts: 11


2/5/2013
Sundara J
Sundara J
Posts: 11
Not sure if this is a bug in fiddler or stresstimulus , but basically the value being sent to a request is different than from when its recorded and played back (it gets double encoded)
When recording and play back the value looks like below
wresult=%3Ctrust%3ARequestSecurityTokenResponseCollection

but when extracted with an extractor and substituted in the request the value looks like below 
wresult=%26lt%3btrust%3aRequestSecurityTokenResponseCollection

Note the encoding %3C which is "<" is now %26lt%3b
Any settings that i need to be looking at ?

thanks in advance for any help
0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


2/5/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
Hello Sundara,


In StresStimulus, usually, extractors are created from HTML responses (which are already decoded and are in plain text). Then when these extractors are used as parameters, StresStimulus automatically encodes their values when necessary.
 
Double encoding would happen if an extractor is taken from an not-decoded response. Not sure how that's possible, though.
 
Please describe how you created the extractor and what value does it return.

Cheers,
_Vadim
0 link
Sundara J
Sundara J
Posts: 11


2/5/2013
Sundara J
Sundara J
Posts: 11
the extractor returns below ==>
&lt;trust:RequestSecurityTokenResponseCollection xmlns:trust=&quot;http://docs.oasis-open.org/ws-sx/ws-trust/200512&quot;>&lt;trust:RequestSecurityTokenResponse Context=&quot;http://10.0.1.201/DMD/website/INVISION/&quot;>&lt;trust:Lifetime>&lt;wsu:Created xmlns:wsu=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot;>2013-01-29T14:52:50.556Z&lt;/wsu:Created>&lt;wsu:Expires xmlns:wsu=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot;>2013-01-29T15:51:50.556Z&lt;/wsu:Expires>&lt;/trust:Lifetime>&lt;wsp:AppliesTo xmlns:wsp=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy&quot;>&lt;EndpointReference xmlns=&quot;http://www.w3.org/2005/08/addressing&quot;>&lt;Address>http://10.0.1.201/dmd/website/&lt;/Address>&lt;/EndpointReference>&lt;/wsp:AppliesTo>&lt;trust:RequestedSecurityToken>&lt;xenc:EncryptedData Type=&quot;http://www.w3.org/2001/04/xmlenc#Element&quot; xmlns:xenc=&quot;http://www.w3.org/2001/04/xmlenc#&quot;>&lt;xenc:EncryptionMethod Algorithm=&quot;http://www.w3.org/2001/04/xmlenc#aes256-cbc&quot; />&lt;KeyInfo xmlns=&quot;http://www.w3.org/2000/09/xmldsig#&quot;>&lt;e:EncryptedKey xmlns:e=&quot;http://www.w3.org/2001/04/xmlenc#&quot;>&lt;e:EncryptionMethod Algorithm=&quot;http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p&quot;>&lt;DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot; />&lt;/e:EncryptionMethod>&lt;KeyInfo>&lt;o:SecurityTokenReference xmlns:o=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot;>&lt;X509Data>&lt;X509IssuerSerial>&lt;X509IssuerName>CN=DigitalDealMakerCertificate&lt;/X509IssuerName>&lt;X509SerialNumber>-83336593415892221562437928126114200997&lt;/X509SerialNumber>&lt;/X509IssuerSerial>&lt;/X509Data>&lt;/o:SecurityTokenReference>&lt;/KeyInfo>&lt;e:CipherData>&lt;e:CipherValue>V6XEIQ4ueE0opG00lPG0Ax/eFVqEo76T0/RxHq1KWS4ER1TPKF6VwyleAP2m+ieZ+7dbu1G+fHGa+YY+0Gi8PlF/vF7kUxsTIjB4ShaeplFsPVBzunAEiDzhTDSjXwpBwgyW7OCUlDoDNw4+84fC4ldd0nBvQeniKhxs1mWIHKA=&lt;/e:CipherValue>&lt;/e:CipherData>&lt;/e:EncryptedKey>&lt;/KeyInfo>&lt;xenc:CipherData>&lt;xenc:CipherValue>DDYmcRoS4YgIDDg/MUFOo5rzszs/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MAa7B5OSWakUYfvuHbb8vfnJ9K2YrThQ==&lt;/xenc:CipherValue>&lt;/xenc:CipherData>&lt;/xenc:EncryptedData>&lt;/trust:RequestedSecurityToken>&lt;trust:RequestedAttachedReference>&lt;o:SecurityTokenReference k:TokenType=&quot;http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1&quot; xmlns:k=&quot;http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd&quot; xmlns:o=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot;>&lt;o:KeyIdentifier ValueType=&quot;http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID&quot;>_6dc42262-3cce-4662-b96e-c79aec65bad6&lt;/o:KeyIdentifier>&lt;/o:SecurityTokenReference>&lt;/trust:RequestedAttachedReference>&lt;trust:RequestedUnattachedReference>&lt;o:SecurityTokenReference k:TokenType=&quot;http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1&quot; xmlns:k=&quot;http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd&quot; xmlns:o=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot;>&lt;o:KeyIdentifier ValueType=&quot;http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID&quot;>_6dc42262-3cce-4662-b96e-c79aec65bad6&lt;/o:KeyIdentifier>&lt;/o:SecurityTokenReference>&lt;/trust:RequestedUnattachedReference>&lt;trust:TokenType>urn:oasis:names:tc:SAML:1.0:assertion&lt;/trust:TokenType>&lt;trust:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue&lt;/trust:RequestType>&lt;trust:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer&lt;/trust:KeyType>&lt;/trust:RequestSecurityTokenResponse>&lt;/trust:RequestSecurityTokenResponseCollection>;
0 link
Sundara J
Sundara J
Posts: 11


2/5/2013
Sundara J
Sundara J
Posts: 11
Note : "&lt;trust .. "encoded again gives %26lt%3btrust.. which is the double encoding problem i am having
when being sent again to server
0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


2/5/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
I see what’s going on. Your extractors include special characters that are HTML-encoded. For example, instead of “<” the extractor returns “&lt”. StresStimulus does not provide HTML-decoding of an extractor, prior to URL- encoding of a request, parameterized with such extractor. We will issue a fix to add support for HTML-decoding extractors in a few days if not tomorrow.
 
As a workaround for now, see if you can define your extractors more narrowly, so they do not include “<” or “>” characters. For example, from your screenshot, it looks like you take a circled snippet of the recorded request and replace the highlighted in green portion with the highlighted in yellow portion, as shown in the "Currently configured" column below.



 
Currently configured
Change to
Recorded
wresult=%3Ctrust%3A
wresult=%3Ctrust%3A
Replayed
wresult=%26lt%3btrust%3a
wresult=%3Ctrust%3A


If you define your extractor to exclude %26lt%3C, as shown in the "Change to" column,  then you'll get the same result, but HTML- encoding will not be an issue. Not sure if the workaround will  fix all extractors,  but, as I said, the fix will be released soon.

Thanks for reporting the issue!

-Vadim



 
0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


2/6/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
Sundara,

We added support for HTML-decoding extractors. To use this option, change the new “Use HTML Decode”  property in your existing extractors, which use encoded special characters, from  No (default) to Yes, as shown on the screenshot below.




As a result, your test should work without the workarounds, that I suggested yesterday.
Use StresStimulus auto-update top install the new version.

Cheers,
-Vadim

0 link
Sundara J
Sundara J
Posts: 11


2/9/2013
Sundara J
Sundara J
Posts: 11
HI Vadim i downloaded the latest update but do not see the option in your screen cap above on the extractor screen.

thx
-Sundara
0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


2/9/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
Hi Sundara,
Check your StresStimulus version. In v2.5.4785 and above, extractors have “Use HTML Decoding” property.
In case you can’t find it, please schedule a web support session at convenient time, using a link that I just sent you via a private message, and I’ll show you this property.
Cheers,
-Vadim
 
0 link
Sundara J
Sundara J
Posts: 11


2/12/2013
Sundara J
Sundara J
Posts: 11
Yep got it and worked very well thanks !
0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


2/12/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
You're welcome, Sundara. Thanks for posting your feedback.
0 link






Copyright © 2024 Stimulus Technology