Re: Remember Me problems with Safari and IE 7

Matthew Hixson <[email protected]> Tue, 30 Sep 2008 15:42:14 -0700
Newsgroups gmane.comp.java.securityfilter.user
Message-ID <[email protected]>
On Sep 30, 2008, at 2:13 PM, Christopher Schultz wrote:

> Matthew,
>
> Matthew Hixson wrote:
>> Remember Me does not work for Safari 3.1.2, but does work for Firefox
>> 3.0.3, both on OS X.
>
> Hmm... unfortunately, I don't have much experience with the "remember
> me" code, and I don't use it myself in any of my projects. Could you
> provide an HTTP protocol dump with a clean browser (i.e. no predefined
> cookies)? I wonder what the specifics of the Set-Cookie header look
> like. Feel free to remove portions of the value, but please keep the
> first and last few bytes in-tact so I can see if there's anything  
> weird
> in there.

HTTP/1.x 302 Moved Temporarily
Server: Apache-Coyote/1.1
Set-Cookie: username="Une/tPxZ7PI="; Version=1; Max-Age=86400
Set-Cookie: password="1CoW3YldTXlHzPRUwJQsQA=="; Version=1; Max- 
Age=86400
Set-Cookie: rememberme=true; Expires=Wed, 01-Oct-2008 21:58:40 GMT
Set-Cookie: validation=241a04131269d2b88a5ca0ba9813d6a4; Expires=Wed,  
01-Oct-2008 21:58:40 GMT
Location: http://hostname/index.jsp
Transfer-Encoding: chunked
Content-Encoding: gzip
Vary: Accept-Encoding
Date: Tue, 30 Sep 2008 21:58:40 GMT

I grabbed that with the "Live HTTP headers" plugin for Firefox.  It  
looks like the username and password cookies are being given a  
Version=1 header and a Max-Age instead of Expires attribute.  My guess  
is that only Firefox knows to read the Max-Age attribute and turn it  
into the cookie's expiration time.

>
>> Is there any reason why Safari is not hanging onto the username and
>> password cookies and Firefox is?
>
> Does Safari retain the cookies after a logout, but before a restart?

Yes.  Upon logging out I have the username and password cookies, but  
not validation nor rememberme.  Safari also shows no expiration time  
for username and password.

>
> The only thing I can think of is that the cookie itself is of a  
> slightly
> different format.
>
> Here's a stupid question: does your web app ask you to login after a
> browser restart (i.e. does 'rememberme' work)?

Yes, it does want me to login after a browser restart.
  Thanks,
   -M@

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/