Ok, I figured out what is causing my problem. I uninstalled and
reinstalled express and connect and I got the same problem with your
code and mine. I took some time to step through the code in a debugger
and what seems to be happening is that in connect/middleware/
session.js where it checks the fingerprint, that it fails that check
and generates a new session which obviously doesn't transfer the old
session data.
The check ( parts[1] !== hash(parts[0]) ) is failing on what I am
assuming are supposed to be equal terms but a character is somehow
getting converted differently. For instance, two cases I saw were:
>>>
parts[1]
ySNKsSR9Pz3g1Cc4FMbc aMGMbFYy6J/IsVOrO/Ir3Y
>>>
hash( parts[0] )
ySNKsSR9Pz3g1Cc4FMbc+aMGMbFYy6J/IsVOrO/Ir3Y
and...
>>>
parts[1]
QxQQ3PcPvDhH3RPgjsO5oMsCQLEY Pj7HwbEp7TKDnU
>>>
hash( parts[0] )
QxQQ3PcPvDhH3RPgjsO5oMsCQLEY+Pj7HwbEp7TKDnU
The space is becoming a plus in the hash but not in the first part of
the check. I see in the hash function in session.js that =, *, and $
are getting replaced, does + need to get replaced as well?
Oh, and in case it matters I am running this locally on my Macbook
with 10.6 and viewing it in both Chrome and Safari (since I saw
somewhere that the session id might be provided by the browser).
Jon
On Feb 10, 7:55 pm, "vision media [ Tj Holowaychuk ]" <t...@vision-
media.ca> wrote:
> right, that too. we just talked about that today here actually haha
>
>
>
>
>
>
>
> On Thu, Feb 10, 2011 at 5:24 PM, Casey Banner <
kcban...@gmail.com> wrote:
> > Make sure your server time is set correctly. I recently wasted a few
> > hours debugging sessions and cookies, only to find my server time was
> > off by several hours from the client time. This was causing cookies to
> > get cleared instantly.
>
> > On Thu, Feb 10, 2011 at 8:15 PM, vision media [ Tj Holowaychuk ]
> > <
t...@vision-media.ca> wrote:
> > > people do seem to have session issues once and a while, although I cannot
> > > ever seem to reproduce them
>
> > > On Thu, Feb 10, 2011 at 5:03 PM, jonny <
fatjo...@gmail.com> wrote:
>
> > >> Hmm. That doesn't work for me. I am guessing that I messed up my
> > >> configuration otherwise this would be a much bigger problem for other
> > >> people. :)
>
> > >> Thanks! I will re-install everything tonight and see if that fixes it.
>
> > >> Jon
>
> > >> On Thu, Feb 10, 2011 at 6:57 PM, vision media [ Tj Holowaychuk ]
> > >> <
t...@vision-media.ca> wrote:
> > >> > hmm this works for me:
> > >> >
https://gist.github.com/c76716ef0717c1fe752a
>
> > >> > On Thu, Feb 10, 2011 at 10:29 AM, fatjonny <
fatjo...@gmail.com>
> > >> >> > > To post to this group, send email to
expre...@googlegroups.com
> > .
> > >> >> > > To unsubscribe from this group, send email to
> ...
>
> read more »