Hey Anurag,
This is the issue we will face when we use a custom login page. We can fix this by handling the encoding in the custom login page.
The below function should take care of the issue. We can call this function on the "TARGET" variable.
<%!
/**
* Fixes a problem with SiteMinder handling of a twice-url-encoded string
* @param str
* @return
*/
public static String fixSiteMinderEncoding(String str) {
// Fix SiteMinder target encoding strangeness
if (str.indexOf("-SM-")!=-1)
{
str = str.substring(4);
str = str.replace("-&", "%26");
str = str.replace("-+", "%2B");
str = str.replace("-%", "%25");
str = str.replace("-$", "%24");
str = str.replace("-.", ".");
str = str.replace("-/", "%2F");
str = str.replace("-:", "%3A");
str = str.replace("-;", "%3B");
str = str.replace("--", "-");
str = str.replace("-=", "%3D");
str = str.replace("-#", "%23");
str = str.replace("-?", "%3F");
str = str.replace("-\n","%0A");
}
else if (str.indexOf("$SM$")!=-1)
{
str = str.substring(4);
str = str.replace("$+", "%2B");
str = str.replace("$&", "%26");
str = str.replace("$%", "%25");
str = str.replace("$$", "%24");
str = str.replace("$.", ".");
str = str.replace("$/", "%2F");
str = str.replace("$:", "%3A");
str = str.replace("$;", "%3B");
str = str.replace("$-", "-");
str = str.replace("$=", "%3D");
str = str.replace("$#", "%23");
str = str.replace("$?", "%3F");
str = str.replace("$\n","%0A");
}
return str;
}
%>
Thanks,
Lalitha