#638583 ikiwiki: Login fails from bookmarked login page

#638583#5
Date:
2011-08-19 22:54:11 UTC
From:
To:
When a user arrives at the login page with no "postsignin" in the
session cookie (e.g., due to having bookmarked the login page)
the login fails with the message:
"login failed, perhaps you need to turn on cookies?"

This is confusing to a user arriving from a bookmark, since cookies
are likely to be turned on in this case.

The current behavior is due to commit 9dbbbd (1/7/2008) and _is_
needed to avoid login failing silently when the user _does_ have
cookies turned off.

The best fix may be to make the error message cover both cases, e.g.:
"login failed, perhaps you need to turn on cookies?  If you are attempting to login from a bookmark, try clicking on the edit link on the page that you want to edit."

#638583#10
Date:
2011-08-24 21:13:23 UTC
From:
To:
Mark Voorhies wrote:

I have been considering for a long time making do=postsignin redirect to
the *actual* page. That would avoid exposing such an url, but it does
mean ikiwiki.cgi would be run an additional time at signin which is more
load on the server and slower for the client. Which is sorta why I've
not done it yet, but this additional work is likely not very
significant.

#638583#15
Date:
2011-08-24 21:13:48 UTC
From:
To:
----- Forwarded message from Mark Voorhies <mark.voorhies@ucsf.edu> -----

Date: Fri, 19 Aug 2011 16:03:02 -0700
From: Mark Voorhies <mark.voorhies@ucsf.edu>
To: Joey Hess <joeyh@debian.org>
Subject: [PATCH] More informative error for failed login from bookmark.
Organization: UCSF

I'm not sure of the best way to format a patch for reportbug, so I'm
sending this patch against ikiwiki via git-format-patch.  It gives a more
informative error message when login fails due to a user arriving from
a bookmark.  I don't think that falling back to the previous behavior
(before commit 9dbbbd) is a good fix, since it would cause login to
fail silently for users with cookies disabled.

Thanks,

Mark

P.S. I did try filing a bug report (without the patch) via reportbug, but I'm
      not sure if it made it into the Debian BTS.
--- IkiWiki/CGI.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 62383b6..975afcf 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -200,7 +200,7 @@ sub cgi_postsignin ($$) { error(gettext("probable misconfiguration: sslcookie is set, but you are attempting to login via http, not https")); } else { - error(gettext("login failed, perhaps you need to turn on cookies?")); + error(gettext("login failed, perhaps you need to turn on cookies? If you are attempting to login from a bookmark, try clicking on the edit link on the page that you want to edit.")); } } }
----- End forwarded message ----- -- see shy jo