[cas-dev] [patch] spnego/ntlm and firefox
Strumyla, Marius
MStrumyla at Accordant.net
Tue Oct 28 11:30:02 EDT 2008
Done. http://www.ja-sig.org/issues/browse/CAS-734
________________________________
From: cas-dev-bounces at tp.its.yale.edu
[mailto:cas-dev-bounces at tp.its.yale.edu] On Behalf Of Scott Battaglia
Sent: Monday, October 27, 2008 9:26 PM
To: Mailing list for CAS developers
Subject: Re: [cas-dev] [patch] spnego/ntlm and firefox
Can you open a JIRA issue for this and attach your patch? We're getting
ready for a 3.3.1 so if we can get this in that would be great.
JIRA is located here: http://www.ja-sig.org/issues
Thanks!
-Scott
-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia
On Mon, Oct 27, 2008 at 5:22 PM, Strumyla, Marius
<MStrumyla at accordant.net> wrote:
Hello, I get an exception when I use spnego/ntlm authentication
and
firefox to access CAS web application. Set
principalWithDomainName to
false. When Firefox 3.0.3 prompts for a login, enter username
without a
domain. JCIFSSpnegoAuthenticationHandler will throw
ArrayIndexOutOfBoundsException.
Here's a patch to fix this:
diff -ru
cas-server-3.3/cas-server-support-spnego/src/main/java/org/jasig/cas/sup
port/spnego/authentication/handler/support/JCIFSSpnegoAuthenticationHand
ler.j
ava
cas-server-3.3-fix/cas-server-support-spnego/src/main/java/org/jasig/cas
/support/spnego/authentication/handler/support/JCIFSSpnegoAuthentication
Handler.ja
va
---
cas-server-3.3/cas-server-support-spnego/src/main/java/org/jasig/cas/sup
port/spnego/authentication/handler/support/JCIFSSpnegoAuthenticationHand
ler.java Thu Aug 14 10:39:54 2008
+++
cas-server-3.3-fix/cas-server-support-spnego/src/main/java/org/jasig/cas
/support/spnego/authentication/handler/support/JCIFSSpnegoAuthentication
Handler.ja
va Mon Oct 27 16:09:39 2008
@@ -16,6 +16,7 @@
import
org.jasig.cas.support.spnego.authentication.principal.SpnegoCredentials;
import java.security.Principal;
+import java.util.regex.Pattern;
/**
* Implementation of an AuthenticationHandler for SPNEGO
supports. This
Handler
@@ -117,7 +118,7 @@
return new SimplePrincipal(name);
}
if (isNtlm) {
- return new SimplePrincipal(name.split("\\\\")[1]);
+ return Pattern.matches("\\w+\\\\\\w+", name) ? new
SimplePrincipal(name.split("\\\\")[1]) : new
SimplePrincipal(name);
}
return new SimplePrincipal(name.split("@")[0]);
}
_______________________________________________
cas-dev mailing list
cas-dev at tp.its.yale.edu
http://tp.its.yale.edu/mailman/listinfo/cas-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas-dev/attachments/20081028/16868487/attachment.html
More information about the cas-dev
mailing list