All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, Aghiles <aghilesk@gmail.com>,
	git list <git@vger.kernel.org>, Kim Ebert <kd7ike@gmail.com>
Subject: Re: Useless error message?
Date: Thu, 22 Apr 2010 12:27:06 +0200	[thread overview]
Message-ID: <4BD0247A.4080103@op5.se> (raw)
In-Reply-To: <20100422101535.GB625@progeny.tock>

On 04/22/2010 12:15 PM, Jonathan Nieder wrote:
> Andreas Ericsson wrote:
>> On 04/22/2010 11:42 AM, Jonathan Nieder wrote:
> 
>>> [1] I do suspect that in the case of failing enter_repo() or missing
>>> git-daemon-export-ok, saying “cannot read the specified repo” would be
>>> fine.  Most of the time, there is not much value in disclosing a more
>>> detailed reason, anyway.
>>
>> That would make it possible for random attackers to determine whether
>> a specific user exists on the system, which is very bad indeed.
> 
> I guess I am missing something.  How would
> 
> (*) $ git clone git://git.example.com/~u/foo
>      remote: Cannot read the specified repo
> 
> tell me whether that user existed on the system?  If the daemon gives
> the same message for ENOENT, missing git-daemon-export-ok, EPERM, and
> so on so I cannot distinguish the cases, then I just don’t see the
> problem.
> 
> If the daemon failed for some other reason, like a flaky network, I
> would see
> 
>      $ git clone git://git.example.com/~u/foo
>      fatal: The remote end hung up unexpectedly
> 
> So the extra information could still be helpful, without unwanted
> information disclosure.  In the case (*) I learn definitively that the
> address I specified does not represent a repo I have access to, rather
> than this being some random, transient unexplained problem.
> 

So that would be the new error message for everything that fails, then?

One big reason why I'm not bothered with running the git-daemon on a
public server is that it's very simple. If something goes wrong, it
dies without fiddling about.

How would it benefit you if it said "fatal: Something went wrong, but
I didn't crash" instead of just hanging up? If you have the wrong
repo address, you'd still have to check up with whoever gave it to
you to get it right. If it *does* crash, you'd still have to get
hold of the server admin to tell him that it has crashed.

A minor patch to git-fetch, updating the error message with a few
possible reasons would be far better. I don't care about it myself,
but I'm sure such a patch would be a lot easier to get into git.git
than something that adds a lot of complexity to the git daemon.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

  reply	other threads:[~2010-04-22 10:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-21 21:17 Useless error message? Aghiles
2010-04-21 21:29 ` Kim Ebert
2010-04-21 22:19 ` Jonathan Nieder
2010-04-22  6:33   ` Junio C Hamano
2010-04-22  9:42     ` Jonathan Nieder
2010-04-22  9:59       ` Andreas Ericsson
2010-04-22 10:15         ` Jonathan Nieder
2010-04-22 10:27           ` Andreas Ericsson [this message]
2010-04-22 10:38             ` Jonathan Nieder
2010-04-22 12:44       ` Ilari Liusvaara
2010-04-22 22:21         ` [PATCH] daemon: report inaccessible repositories to user Jonathan Nieder
2010-04-22 11:56   ` Useless error message? Petr Baudis
2010-04-22 20:13     ` Aghiles

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=4BD0247A.4080103@op5.se \
    --to=ae@op5.se \
    --cc=aghilesk@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=kd7ike@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.