Re: Control character in cookie value or attribute

2011-05-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 5/24/2011 5:28 PM, Caldarale, Charles R wrote: >> From: Christopher Schultz [mailto:ch...@christopherschultz.net] >> Subject: Re: Control character in cookie value or attribute > >> On 5/24/2011 5:09 PM

Re: Control character in cookie value or attribute

2011-05-24 Thread Dan Checkoway
Hope you don't mind...I opened a ticket for this: https://issues.apache.org/bugzilla/show_bug.cgi?id=51260 Dan On Tue, May 24, 2011 at 5:28 PM, Caldarale, Charles R wrote: >> From: Christopher Schultz [mailto:ch...@christopherschultz.net] >> Subject: Re: Control character i

RE: Control character in cookie value or attribute

2011-05-24 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: Control character in cookie value or attribute > On 5/24/2011 5:09 PM, Dan Checkoway wrote: > > -} else if (CookieSupport.isHttpToken(value) && > > -!CookieSuppor

Re: Control character in cookie value or attribute

2011-05-24 Thread Dan Checkoway
I wasn't gonna say anything about that, but I did consult my "operator precedence" reference while looking at it... :-) +1 on parens! Dan On Tue, May 24, 2011 at 5:21 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Dan, > > On 5/24/2011 5:09 PM, Dan Checkow

Re: Control character in cookie value or attribute

2011-05-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, On 5/24/2011 5:09 PM, Dan Checkoway wrote: > -} else if (CookieSupport.isHttpToken(value) && > -!CookieSupport.ALLOW_HTTP_SEPARATORS_IN_V0 || > -CookieSupport.isV0Token(value) && > -CookieSu

Re: Control character in cookie value or attribute

2011-05-24 Thread Dan Checkoway
Set-Cookie header, but I'd love to get to the bottom of it (I'm of the "no >> request left behind" mindset), and I'm still in the dark about what Tomcat >> doesn't like about what it's being passed. >> >> Can you guys shed any light on

Re: Control character in cookie value or attribute

2011-05-24 Thread Mark Thomas
t Tomcat > doesn't like about what it's being passed. > > Can you guys shed any light on what might evoke that "Control character in > cookie value or attribute" error in 7.0.14? One of the huge benefits of Tomcat is that it is open source so, if you know where to

Re: Control character in cookie value or attribute

2011-05-24 Thread Dan Checkoway
ed. Can you guys shed any light on what might evoke that "Control character in cookie value or attribute" error in 7.0.14? I still can't get my head wrapped around which ServerCookie.* property(ies) to tweak to try to figure this out. Thanks, Dan On Fri, May 20, 2011 at 4:56 PM,

Re: Control character in cookie value or attribute

2011-05-20 Thread Dan Checkoway
Ah, thanks! To be honest I'm not sure which of those properties would work around the "Control character in cookie value or attribute" exception. Maybe org.apache.tomcat.util.http. ServerCookie.FWD_SLASH_IS_SEPARATOR? I can't tell if "Control character" means a l

RE: Control character in cookie value or attribute

2011-05-20 Thread Caldarale, Charles R
> From: Dan Checkoway [mailto:dchecko...@gmail.com] > Subject: Control character in cookie value or attribute > I honestly have no idea if it's related to the tomcat version > or some legitimately wacked out Set-Cookie header coming in. Both, actually. Tomcat 7 is bit more pi

Control character in cookie value or attribute

2011-05-20 Thread Dan Checkoway
ing the request processing java.lang.IllegalArgumentException: Control character in cookie value or attribute. at org.apache.tomcat.util.http.CookieSupport.isHttpSeparator(CookieSupport.java:192) at org.apache.tomcat.util.http.Cookies.processCookieHeader(Cookies.java

Re: Control character in cookie value

2009-12-09 Thread David Fisher
lter chain javax.servlet.ServletException: #{identity.login}: java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value Itay showed it here: *After encoding:* Base64.encodeBytes(sb.toString(

Re: Control character in cookie value

2009-12-09 Thread Christopher Schultz
the reason > had been given beforehand. I did read the thread carefully, and nowhere was it explained why this error message was being emitted: SEVERE: Exception in the filter chain javax.servlet.ServletException: #{identity.login}: java.lang.IllegalArgumentException: Control character in cookie v

Re: Control character in cookie value

2009-12-09 Thread André Warnier
Chris, Christopher Schultz wrote: I'm surprised that nobody else has noticed that the control characters in question were already posted by Itay... it's just that nobody bothered to read the error message properly :) And we are quite flabbergasted that you did not peruse the thread carefully

Re: Control character in cookie value

2009-12-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 12/8/2009 6:28 PM, André Warnier wrote: > So now I can go to sleep peacefully, knowing that these parts of the > cookie do not in effect contain control characters. I'm surprised that nobody else has noticed that the control characters in q

Re: Control character in cookie value

2009-12-08 Thread André Warnier
Itay, you seem to ignore selective parts of the answers and tips which you are given, and then rediscover them selectively 3 posts later. itay sahar wrote: Andre, I'm not sure why you worry about the other cookie value. Thank you for your concern, but I don't worry too much. It is not my

Re: Control character in cookie value

2009-12-08 Thread itay sahar
Andre, I'm not sure why you worry about the other cookie value. let me show you an example maybe then you may see something that i'm missing. getCookieMaxAge() is 31536000 cookiePathis /jboss-seam-jpa What can be wrong here ? It works! Are you worry about special character on cookiePath.

Re: Control character in cookie value

2009-12-08 Thread Christopher Schultz
e encoding works and no exception is thrown. But when seam try adding the > cookie an exception is thrown: [snip] > javax.servlet.ServletException: #{identity.login}: > java.lang.IllegalArgumentException: Control character in cookie value, > consider BASE64 encoding your value I

Re: Control character in cookie value

2009-12-07 Thread itay sahar
sure! protected void setCookieValueIfEnabled(String value) { FacesContext ctx = FacesContext.getCurrentInstance(); if ( isCookieEnabled() && ctx != null) { HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext().getResponse(); Cookie co

Re: Control character in cookie value

2009-12-07 Thread André Warnier
itay sahar wrote: sure! protected void clearCookieValue() { Cookie cookie = getCookie(); if ( cookie!=null ) { HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse(); cookie.setValue(null);

Re: Control character in cookie value

2009-12-07 Thread itay sahar
>>>>>> return Base64.encodeBytes(sb.toString().getBytes()); > >>>>>> } > >>>>>> > >>>>>> Input is: > >>>>>> > >>>>>> username= itay.sa...@gmial.com > >>>>>> value= 6de5ca4f:1254c461110:-7

Re: Control character in cookie value

2009-12-07 Thread Pid Ster
> Can you suggest solution ? >>>>>> >>>>>> Yep. >>>>> >>>>> You are claiming that you are supplying A & B to the encodeToken >>>>> function, >>>>> but then you are using B as the cookie value. >

Re: Control character in cookie value

2009-12-07 Thread itay sahar
; Hint, if it contains a ":" character, it's not Base64 encoded. >>>> >>>> >>>> >>>> p >>>> >>>> >>>> On Sun, Dec 6, 2009 at 11:28 PM, itay sahar >>>&g

Re: Control character in cookie value

2009-12-07 Thread itay sahar
;>> >>>> Hi Andre, >>>> >>>>> please see below input and output of: >>>>> protected String encodeToken(String username, String value) >>>>> { >>>>> StringBuilde

Re: Control character in cookie value

2009-12-07 Thread André Warnier
ut is: username= itay.sa...@gmial.com value=6de5ca4f:1254c461110:-7feb:9135486247122677484 Output is: aXRheS5zYWhhckBnbWFpbC5jb206NmRlNWNhNGY6MTI1NGM0NjExMTA6LTdmZWI6OTEzNTQ4NjI0 Can you suggest solution ? On Sat, Dec 5, 2009 at 6:20 PM, André Warnier wrote: Mark Thomas wrote: itay sahar wrote:

Re: Control character in cookie value

2009-12-07 Thread itay sahar
sb.append(username); >>> sb.append(":"); >>> sb.append(value); >>> return Base64.encodeBytes(sb.toString().getBytes()); >>> } >>> >>> Input is: >>> >>> username= itay.sa...@gmial.com >>> >>> value=6de5ca4f:1254c461110:-

Re: Control character in cookie value

2009-12-07 Thread Pid
PM, André Warnier wrote: Mark Thomas wrote: itay sahar wrote: Caused by: java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value at org.apache.tomcat.util.http.ServerCookie.maybeQuote2(ServerCookie.java:396) To cause this, there m

Re: Control character in cookie value

2009-12-06 Thread itay sahar
0 > > > > Can you suggest solution ? > > On Sat, Dec 5, 2009 at 6:20 PM, André Warnier wrote: > >> Mark Thomas wrote: >> >>> itay sahar wrote: >>> >>>> Caused by: java.lang.IllegalArgumentException: Control character in >>&g

Re: Control character in cookie value

2009-12-05 Thread itay sahar
il address. Thanks! On Sat, Dec 5, 2009 at 3:37 PM, Mark Thomas wrote: > itay sahar wrote: > > Caused by: java.lang.IllegalArgumentException: Control character in > cookie > > value, consider BASE64 encoding your value > > at > > > org.apache.tomcat.util.http

Re: Control character in cookie value

2009-12-05 Thread André Warnier
Mark Thomas wrote: itay sahar wrote: Caused by: java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value at org.apache.tomcat.util.http.ServerCookie.maybeQuote2(ServerCookie.java:396) To cause this, there must be a character in the

Re: Control character in cookie value

2009-12-05 Thread Mark Thomas
itay sahar wrote: > Caused by: java.lang.IllegalArgumentException: Control character in cookie > value, consider BASE64 encoding your value > at > org.apache.tomcat.util.http.ServerCookie.maybeQuote2(ServerCookie.java:396) To cause this, there must be a character in the v

Re: Control character in cookie value

2009-12-05 Thread itay sahar
t; SEVERE: Exception in the filter chain >> javax.servlet.ServletException: #{identity.login}: >> java.lang.IllegalArgumentException: Control character in cookie value, >> consider BASE64 encoding your value >>at javax.faces.webapp.FacesServlet.service(FacesServlet.

Re: Control character in cookie value

2009-12-05 Thread André Warnier
23:00 org.ajax4jsf.webapp.BaseXMLFilter doXmlFilter SEVERE: Exception in the filter chain javax.servlet.ServletException: #{identity.login}: java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value at javax.faces.webapp.FacesServlet.service(FacesServlet.jav

Control character in cookie value

2009-12-04 Thread itay sahar
ilter doXmlFilter SEVERE: Exception in the filter chain javax.servlet.ServletException: #{identity.login}: java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)