From: Andreas Ericsson <ae@op5.se>
To: Nicolas Pitre <nico@cam.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Tom Preston-Werner <tom@github.com>,
git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] connect.c: add a way for git-daemon to pass an error back to client
Date: Sat, 01 Nov 2008 12:30:42 +0100 [thread overview]
Message-ID: <490C3DE2.3010808@op5.se> (raw)
In-Reply-To: <alpine.LFD.2.00.0810312218300.13034@xanadu.home>
Nicolas Pitre wrote:
> On Sat, 1 Nov 2008, Johannes Schindelin wrote:
>
>> Hi,
>>
>> On Fri, 31 Oct 2008, Tom Preston-Werner wrote:
>>
>>> The current behavior of git-daemon is to simply close the connection on
>>> any error condition. This leaves the client without any information as
>>> to the cause of the failed fetch/push/etc.
>>>
>>> This patch allows get_remote_heads to accept a line prefixed with "ERR"
>>> that it can display to the user in an informative fashion. Once clients
>>> can understand this ERR line, git-daemon can be made to properly report
>>> "repository not found", "permission denied", or other errors.
>>>
>>> Example
>>>
>>> S: ERR No matching repository.
>>> C: fatal: remote error: No matching repository.
>> Makes sense to me.
>
> Note that this behavior of not returning any reason for failure was
> argued to be a security feature in the past, by Linus I think.
>
By me actually. I wrote the patch for it. Showing "no matching repository"
means git-daemon can be used to disclose information about the remote
server's filesystem layout. While I understand that it's sometimes a useful
feature, please don't ever enable it by default.
That said, I like this patch, as it only works client-side and just enables
others to write code that let's the daemon (if configured to do so) ship a
more informative error message.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2008-11-01 11:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-01 1:59 [PATCH] connect.c: add a way for git-daemon to pass an error back to client Tom Preston-Werner
2008-11-01 2:19 ` Johannes Schindelin
2008-11-01 2:18 ` Tom Preston-Werner
2008-11-01 2:20 ` Nicolas Pitre
2008-11-01 2:35 ` Johannes Schindelin
2008-11-01 3:35 ` Tom Preston-Werner
2008-11-01 11:34 ` Andreas Ericsson
2008-11-01 14:39 ` Alex Riesen
2008-11-01 11:30 ` Andreas Ericsson [this message]
2008-11-01 5:39 ` Junio C Hamano
2008-11-01 6:29 ` Tom Preston-Werner
2008-11-01 18:10 ` Shawn O. Pearce
2008-11-01 22:48 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=490C3DE2.3010808@op5.se \
--to=ae@op5.se \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nico@cam.org \
--cc=tom@github.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).