function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chirag MehtaChirag Mehta 

Site.Login returns extra digits '25' in the URL

 

 

PageReference pr = Site.login(emailAddress,p.regPassword,'/PersonalDetails');

 

 

Above piece of code generates following URL

 

 

https://zebra.force.com/asia/secur/frontdoor.jsp?cshc=0000000xrYf0000000HGIN&portalId=060T00000004f1h&refURL=https%253A%252F%252Fzebra ....

 

 

On debugging, I found that an extra "25" is added at multiple locations. If I remove all the instances of "25", it works perfectly fine and I am able to login to customer portal

Correct URL

https://zebra.force.com/asia/secur/frontdoor.jsp?cshc=0000000xrYf0000000HGIN&portalId=060T00000004f1h&refURL=http%3A%2%2Fzebra...                                    

 

What can be the reason for this extra "25"?
Anything specific to user locale? (Current Locale : United Kingdom)

 

_Prasu__Prasu_

Hello Chirag,

 

Its happening due to double encoding of the URL:

Your URL is:

 

https%253A%252F%252Fzebra ....

If you decode it you will get following thing:

 

https%3A%2F%2Fzebra ....

 And if you again decode it you will get original URL:

 

https://zebra ....

 So I think you need to decode URL somewhere and then use it for redirecting.

 

While URL encoding "%" in "%3A" getting converted to %25

 

I hope this helps.

 

waterwater

Hello Prasanna,

 

I am experiencing something similar when logging into our customer portal, using the SiteLogin component (<c:SiteLogin id="siteLogin"/>) for authentication.

 

When I click "Login" after entering my username and password, I am directed to an "Authorization Required" (looks like a force.com-generated) page.  Here, I see the extra '25' digits in the URL.  Like Chirag, I am able to access the portal's homepage by manually removing those extra digits from the URL and hitting enter.

 

Any idea as to how I can prevent the (double encoding) extra digits from being added in the first place?

 

I have successfully used the <c:SiteLogin id="siteLogin"/> component on a previous login page for this same portal, and I'm confused as to why it's not working in my new login page.

 

Any help would be greatly appreciated.

 

Thank you!