Not sure if anyone encountered this issue. Basically, I am doing an encoding of user details and then via email, I am sending the encoded value (which I got form crypto.encryptWithManagedIV) to the user in the email body
Below is the code:
AESKey is the encrypted value which I got using apex crypto class. String TargetUrl = 'https://mysandbox.cs88.force.com/redirectpage'; String hyperlink = '<a href="'+TargetUrl+'?uniqueId='+AESKey+'">Link to Join</a>'; mail.setHtmlBody(htmlbdy);
When the user clicks this link I use get parameter on my redirect VF page
String KeyValue= ApexPages.currentPage().getParameters().get('uniqueId'); System.debug('RequestKey:-'+KeyValue);
On the browser the URL looks like :
But after doing getParameters().get('uniqueId'), I get E f7X10FDW3ExD1+jgfcRdHD1Helxk vk=
Similarly, if the URL has & then it ignores completely the rest https://mysandbox.cs88.force.com/?uniqueId=E&YhgD+f7X10FDW3ExD1jgfcRdHD18lUpsjofIyWRVzCW
In this case, I get only E by doing get parameters The plus sign is getting replaced by space, which then makes my entire decoding login fails.
Can we get the exact parameters what we have in the URL without any modifications in salesforce ??