[jcifs] Request.getRemoteUser() - Mozilla and IE differs

Ghouse, Sherjeel Sherjeel.Ghouse at molex.com
Thu Jul 6 13:46:38 GMT 2006

I had a similar situation where Application was accessed using different browsers and over VPN (trusted domains).  Since my application is Servlet based. I was able to trim the domain name(Intranet, VPN, IE) or no domain (in case of FireFox) by overriding get() of the HttpServlet. You could use StrinkTokenizer or whatever logic to figure out if domain name comes in getRemoteUser() or not. You could then store the UserName in HttpSession to be used all over your application. 
Hope that helps.

	-----Original Message-----
	From: jcifs-bounces+sghouse=molex.com at lists.samba.org [mailto:jcifs-bounces+sghouse=molex.com at lists.samba.org] On Behalf Of Göran Karlsson (KA/EAB)
	Sent: Thursday, July 06, 2006 8:38 AM
	To: jcifs at lists.samba.org
	Subject: [jcifs] Request.getRemoteUser() - Mozilla and IE differs


	Update: I got the Ntlmfilter working on Tomcat now. I had other filters at the same time, and I inserted the Ntlmfilter in the wrong place. I put it last instead of first.

	Now I have another problem. When I get the client user ID in a servlet with request.getRemoteUser() IE will give me domain\userid while Mozilla Firefox will give me only the userid. The domain should be the same for all the users in this case, so I could work around this by checking if the domain is there and in that case cut it off, or append it if it's not there. But the problem is that a lot of existing code is using getRemoteUser, and I can't go around and handle this everywhere. 

	So how do I get the user id in the same way from both browsers? Surely somebody else here has had the same problem? 

	My filter configuration is as follows: 


	Any ideas are greatly appreciated. 


CONFIDENTIALITY NOTICE: This message (including any attachments) may contain Molex confidential information, protected by law. If this message is confidential, forwarding it to individuals, other than those with a need to know, without the permission of the sender, is prohibited.

This message is also intended for a specific individual. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message or taking of any action based upon it, is strictly prohibited. 

Chinese  Japanese


-------------- next part --------------
HTML attachment scrubbed and removed

More information about the jcifs mailing list