]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/httpauth_conflicts_with_git_anon_push.mdwn
(no commit message)
[ikiwiki.git] / doc / bugs / httpauth_conflicts_with_git_anon_push.mdwn
1 Someone tried to report a bug using IRC while I was on vacation.
2 --[[Joey]] 
3
4 <pre>
5 julm: [11:58:35] han, it's me the problem; I was generating a post-update hook instead of a pre-receive hook
6 julm: [12:03:59] why does the pre-receive hook return: "Status: 302 Found" and a "Location: <url>"? Is it normal?
7 julm: [00:08:44] it's Plugin/httpauth.pm which is outputing those Status and Location
8 julm: [00:09:12] problem is that it's an anonymous push via git://
9 julm: [03:28:53] hacked my way to fix it somehow: http://git.internet.alpes.fr.eu.org/?p=web/ikiwiki.git;a=commitdiff;h=7211df4f7457c3afab53822a97cbd21825c473f4
10 </pre>
11
12 Analysis: 
13
14 * IkiWiki::Receive calls `check_canedit`.
15 * httpauth's canedit hook returns an error handler function
16   which redirects the browser through the cgiauthurl.
17   (Similarly, signinedit's hook may call needsignin, which
18   can display a signin form.
19 * That doesn't work well when doing a git anon push. :)
20 * Also, IkiWiki::Receive calls `check_canattach` and
21   `check_canremove`, which both also call `check_canedit`.
22
23 So, all these calls need to avoid running the error handler
24 functions returned by canedit hooks, and just return error
25 messages. [[done]] --[[Joey]]