jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Basic Authentication and special characters
Date Sun, 15 Dec 2002 11:17:21 GMT
Hi Randy,

To complement what Jason said, here is an extract from the Cactus
BasicAuthentication class (which itself comes from the HTTP 1.0 spec):

        // According to HTTP 1.0 Spec:
        // userid   = [ token ]
        // token    = 1*<any CHAR except CTLs or tspecials>
        // CTL      = <any US-ASCII control character (octets 0-31) and
        //            DEL (127)
        // tspecial = "(" | ")" | "<" | ">" | "@"
        //            "," | ";" | ":" | "\" | <">
        //            "/" | "[" | "]" | "?" | "="
        //            "{" | "}" | SP | HT
        // SP       = <US-ASCII SP, space (32)>
        // HT       = <US-ASCII HT, horizontal-tab (9)>
        // Validate the given theName
        // The theName is optional, it can be blank.

This means "@" is an *invalid* character.

-Vincent

> -----Original Message-----
> From: Randy Shoup [mailto:randy.shoup@tumbleweed.com]
> Sent: 03 December 2002 22:03
> To: cactus-user@jakarta.apache.org
> Subject: Basic Authentication and special characters
> 
> I am not sure whether this is proper forum for this question, but ...
> 
> I am trying to use Cactus 1.4.1 and JBoss 3.0.4, with Basic
> Authentication.  In the back, JBoss authenticates the login to an LDAP
> server where user names are like email addresses (user@foo.com).
> 
> When I try to authenticate with such a user name, Cactus complains
that
> '@' is a special character (stack trace below).
> 
> According to the Cactus code, and the HTTP 1.0 spec, this is perfectly
> correct.  I tried escaping the '@' in various ways -- '%40' and
'&#64;'
> -- but neither worked.
> 
> My question is:  How do other people use Basic Authentication and
> so-called "special" characters like the extremely common '@'?  Am I
just
> out of luck?  Is there a way to escape the '@' so that I can in fact
> authenticate?
> 
> ------------
> stack trace:
>      [junit] Testcase: testBasicAuthentication took 0.078 sec
>      [junit]     Caused an ERROR
>      [junit] Given theName contains illegal characters.
>      [junit] java.lang.IllegalArgumentException: Given theName
contains
> illegal characters.
>      [junit]     at
>
org.apache.cactus.client.authentication.BasicAuthentication.validateName
(B
> asicAuthentication.java;org/apache/cactus/util/log/LogAspect.aj(1k)
> :153)
>      [junit]     at
>
org.apache.cactus.client.authentication.AbstractAuthentication.dispatch6
_s
> etName(AbstractAuthentication.java;org/apache/cactus/util/log/LogAs
> pect.aj(1k):108)
>      [junit]     at
>
org.apache.cactus.client.authentication.AbstractAuthentication.around6_s
et
> Name(AbstractAuthentication.java;org/apache/cactus/util/log/LogAspe
> ct.aj(1k):1156)
>      [junit]     at
>
org.apache.cactus.client.authentication.AbstractAuthentication.setName(A
bs
> tractAuthentication.java;org/apache/cactus/util/log/LogAspect.aj(1k
> ):106)
>      [junit]     at
>
org.apache.cactus.client.authentication.AbstractAuthentication.<init>(Ab
st
> ractAuthentication.java;org/apache/cactus/util/log/LogAspect.aj(1k)
> :97)
>      [junit]     at
>
org.apache.cactus.client.authentication.BasicAuthentication.<init>(Basic
Au
> thentication.java;org/apache/cactus/util/log/LogAspect.aj(1k):113)
> 
> Thanks,
> -- Randy
> _________________________________________________________________
> Randy Shoup
> Tumbleweed Communications Corporation           rshoup@tumbleweed.com
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message