jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robertson, Jason" <Jason.Robert...@acs-inc.com>
Subject RE: Basic Authentication and special characters
Date Wed, 04 Dec 2002 14:04:59 GMT
The easiest thing to do would be to extend the BasicAuthentication class and
override the validateName method to just return without checking anything
(or you could copy the existing code and just remove the @ from the
illegalChars string). Then, just use your new class in your test case.

I don't know of any way to escape it that would make it work, and I'm pretty
sure most of the illegal characters are defined as illegal to avoid
potential control characters in networking hardware. If in your particular
environment the @ doesn't hold a special place then you can ignore the spec.


Jason

-----Original Message-----
From: Randy Shoup [mailto:randy.shoup@tumbleweed.com]
Sent: Tuesday, December 03, 2002 5:03 PM
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(Bas
icAuthentication.java;org/apache/cactus/util/log/LogAspect.aj(1k)
:153)
     [junit]     at 
org.apache.cactus.client.authentication.AbstractAuthentication.dispatch6_set
Name(AbstractAuthentication.java;org/apache/cactus/util/log/LogAs
pect.aj(1k):108)
     [junit]     at 
org.apache.cactus.client.authentication.AbstractAuthentication.around6_setNa
me(AbstractAuthentication.java;org/apache/cactus/util/log/LogAspe
ct.aj(1k):1156)
     [junit]     at 
org.apache.cactus.client.authentication.AbstractAuthentication.setName(Abstr
actAuthentication.java;org/apache/cactus/util/log/LogAspect.aj(1k
):106)
     [junit]     at 
org.apache.cactus.client.authentication.AbstractAuthentication.<init>(Abstra
ctAuthentication.java;org/apache/cactus/util/log/LogAspect.aj(1k)
:97)
     [junit]     at 
org.apache.cactus.client.authentication.BasicAuthentication.<init>(BasicAuth
entication.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