Done. http://www.ja-sig.org/issues/browse/CAS-734
 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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
<[EMAIL PROTECTED]> 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
        [email protected]
        http://tp.its.yale.edu/mailman/listinfo/cas-dev
        


_______________________________________________
cas-dev mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas-dev

Reply via email to