From: Joey Hess Date: Mon, 30 Aug 2010 20:05:15 +0000 (-0400) Subject: Avoid trying to log the user in when receiving anonymous pushes from git and a plugin... X-Git-Tag: 3.20100831~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a330b1ee743f093a03ff23b2d4bff42df7def8b9;p=ikiwiki.git Avoid trying to log the user in when receiving anonymous pushes from git and a plugin like httpauth returns a login function. Just use check_canedit in nonfatal mode. --- diff --git a/IkiWiki/Receive.pm b/IkiWiki/Receive.pm index d116049c4..14936f8cd 100644 --- a/IkiWiki/Receive.pm +++ b/IkiWiki/Receive.pm @@ -95,8 +95,7 @@ sub test () { if ($change->{action} eq 'change' || $change->{action} eq 'add') { if (defined $page) { - IkiWiki::check_canedit($page, $cgi, $session); - next; + next if IkiWiki::check_canedit($page, $cgi, $session, 1); } else { if (IkiWiki::Plugin::attachment->can("check_canattach")) { diff --git a/debian/changelog b/debian/changelog index df74e35d1..a1ef33b22 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,8 @@ ikiwiki (3.20100816) UNRELEASED; urgency=low setup. (intrigeri) * t/bazaar.t: Work around bzr 2.2.0's new requirement to configure bzr whoami before committing. + * Avoid trying to log the user in when receiving anonymous pushes + from git and a plugin like httpauth returns a login function. -- Joey Hess Sun, 15 Aug 2010 11:45:48 -0400 diff --git a/doc/bugs/httpauth_conflicts_with_git_anon_push.mdwn b/doc/bugs/httpauth_conflicts_with_git_anon_push.mdwn index 3e496fef4..91507f57a 100644 --- a/doc/bugs/httpauth_conflicts_with_git_anon_push.mdwn +++ b/doc/bugs/httpauth_conflicts_with_git_anon_push.mdwn @@ -22,4 +22,4 @@ Analysis: So, all these calls need to avoid running the error handler functions returned by canedit hooks, and just return error -messages. +messages. [[done]] --[[Joey]]