httpauth: Avoid redirecting the user to the cgiauthurl if they already have a login session.

master
Joey Hess 2010-08-30 18:32:32 -04:00
parent 2df0999e40
commit f55c7d1396
2 changed files with 4 additions and 2 deletions

View File

@ -84,6 +84,8 @@ sub canedit ($$$) {
my $session=shift; my $session=shift;
if (! defined $cgi->remote_user() && if (! defined $cgi->remote_user() &&
(! defined $session->param("name") ||
! IkiWiki::userinfo_get($session->param("name"), "regdate")) &&
defined $config{httpauth_pagespec} && defined $config{httpauth_pagespec} &&
length $config{httpauth_pagespec} && length $config{httpauth_pagespec} &&
defined $config{cgiauthurl} && defined $config{cgiauthurl} &&

4
debian/changelog vendored
View File

@ -23,8 +23,8 @@ ikiwiki (3.20100816) UNRELEASED; urgency=low
setup. (intrigeri) setup. (intrigeri)
* t/bazaar.t: Work around bzr 2.2.0's new requirement to configure * t/bazaar.t: Work around bzr 2.2.0's new requirement to configure
bzr whoami before committing. bzr whoami before committing.
* Avoid trying to log the user in when receiving anonymous pushes * httpauth: Avoid redirecting the user to the cgiauthurl if
from git and a plugin like httpauth returns a login function. they already have a login session.
-- Joey Hess <joeyh@debian.org> Sun, 15 Aug 2010 11:45:48 -0400 -- Joey Hess <joeyh@debian.org> Sun, 15 Aug 2010 11:45:48 -0400