Mailing List Archive

That darn cookie
I've just submitted changes to special_userlog(in|out).php which should
fix the infamous cookie path problem (login cookie sets path of /wiki/ and
thus you aren't logged in when you look at / or /wiki.phtml -- yecch!)

People will have to re-login to make it take effect once installed...

-- brion vibber (brion @ pobox.com)
Re: That darn cookie [ In reply to ]
On Tue, 21 May 2002 lcrocker@nupedia.com wrote:
> (Brion wrote:)
> > I've just submitted changes to special_userlog(in|out).php
> > which should fix the infamous cookie path problem (login
> > cookie sets path of /wiki/ and thus you aren't logged in when
> > you look at / or /wiki.phtml -- yecch!)
>
> This is installed at http://www.piclab.com/wiki/wiki.phtml now,
> so you can test it.

Seems okay so far... cookie path is /, so in theory it should work.

> While the problem is fresh in your mind, it
> would be helpful if you could test /newwiki as well, since one
> of few things I didn't borrow any code at all for is the user
> login system--it's all new, and I think works the way I would
> expect, but it would be nice to have some other opinions on that.

(Random note: Try going to
http://www.piclab.com/newwiki/wiki.phtml?title=:Richter_scale
You get [[Ichter scale]] instead.)

As far as the login: it's still setting a cookie path of /newwiki. (It
appears to always set the current directory unless you specify otherwise
to setcookie(); a simple fix.)

A couple other notes on the login screen:
* Eliminating the separate login step after creating a new account is a
good thing; it saves confusion (and precious mouse clicks). Kudos!

* I don't really like the way the "login" is up top and "create new
account" down bottom. (I'm the one who made it do that, so blame me... I
split them up because it was difficult to figure out how to make them work
when they were merged together -- if you filled out both password fields
it would attempt to create a new account and would NOT log you in to an
existing one. But it's still ugly.) Perhaps we could put them
side-by-side, or just make "create new account" a separate screen which
you can click to from the login form (or from a failed login attempt). In
any case, that's mainly a cosmetic issue.

* I'd love it if, after logging in, I got sent back to where I came from!
If one is logging in in order to edit/deal with watchlist/whatever,
perhaps one is already at a particular page one wants to manipulate, and
doesn't wish to go find it again or back-back-back-reload or use-other-window-
switch-back-reload. (Same would be nice for the user preferences.) What
think you?

* Uhhh, I put another asterisk in here but I don't remember what for. I do
hope it wasn't important.

-- brion vibber (brion @ pobox.com)
Re: That darn cookie [ In reply to ]
(Messages seem to be falling off the list again.)

On mer, 2002-05-22 at 01:27, lcrocker@nupedia.com wrote:
> >(Random note: Try going to
> > http://www.piclab.com/newwiki/wiki.phtml?title=:Richter_scale
> >You get [[Ichter scale]] instead.)
>
> Fixed, thanks.
>
> > As far as the login: it's still setting a cookie path of /newwiki.
> > (It appears to always set the current directory unless you specify
> > otherwise to setcookie(); a simple fix.)
>
> Fixed. Can I ask what you're using to test cookies? I'm telnetting
> to port 80 and doing things manually which is a pain.

Oh, I'm a lazy one. I just try logging in with Netscape or Mozilla and
look at the resulting cookies file. Good enough for my purposes...

> >A couple other notes on the login screen:
> > * I don't really like the way the "login" is up top and "create
> > new account" down bottom. (I'm the one who made it do that, so
> > blame me... I split them up because it was difficult to figure out
> > how to make them work when they were merged together...
>
> I didn't much like it either, I just quickly copied the old one. It's
> better now, I think. Perhaps some text could be added as well.

Ahh, I like the new one! Compact, yet clear in function.

A couple further thoughts: I suspect we might want to explicitly mark
the e-mail field for new accounts as "optional" to appease the paranoids
out there.

It looks kind of like "Remember my password across sessions" is grouped
in with the 'create new account' function, but as far as I know it
applies both for new accounts and later logins. Should it be separated
by a blank line? Eh.

> > * I'd love it if, after logging in, I got sent back to where I
> > came from!
>
> Great idea! Done.

Woohoo! Thanks.

-- brion vibber (brion @ pobox.com)