Siebel Special character in username.

Document ID : KB000124123
Last Modified Date : 04/01/2019
Show Technical Document Details
Issue:
The Username has underscore(_) or other special character in it and it is being converted to %5F and getting access error in siebelagent.log.

NOTE: This worked prior to upgrading Siebel to IP16 and the Siebel agent from 5.6 to 12.51
Environment:
SSO Siebel Agent 12.51 
Sieble Server: any supported. 
Cause:
Siebel Agent 5.6 SP4 URL encoded the username due to it being passed in the query string in the GET request back to start.swe. 
With the 12.51 ERP agent this request was switched to a POST and the POST body now does not have to be URL Encoded as it is not part of the URL. 
The code in the security adapter no longer is url-decoding the username value – but the ASP code that is included by siebelstartup.asp is still url encoding the usernames, and would only really cause this problem for characters that need to be encoded, like the dash character.  

 
Resolution:
In the functions.inc file found in Line 42 - 49 contains the following. 
---------------------------------------------------------------- 
Function GetHeaders 
' BaseURL is the URL of the application 
BaseURL = Request.QueryString( "URL" ) 
Username = server.urlencode( GetAttribute( "SIEBELUSER" ) ) 
Ticket = GetAttribute( "SIEBELTICKET" ) 
End Function 
------------------------------------- 
The recommendation is to make update that area of configuration file to... 
---------------------------------------------------------------- 
Function GetHeaders 
' BaseURL is the URL of the application 
BaseURL = Request.QueryString( "URL" ) 
'Old method of obtaining the SiebelUser: 
'Username = server.urlencode( GetAttribute( "SIEBELUSER" ) ) 

Username = GetAttribute( "SIEBELUSER" ) 
Ticket = GetAttribute( "SIEBELTICKET" ) 
End Function 

----------------------------------------------------------------