Re: [PATCH 2/4] upload-pack.c: allow banning certain object filter(s)
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jul 23, 2020, 07:51 UTC
- Message-ID
- <20200723075144.GL11341@szeder.dev>
- In-Reply-To
- <20200722201634.GB59352@syl.lan>
On Wed, Jul 22, 2020 at 04:16:34PM -0400, Taylor Blau wrote:
Show 19 quoted lines
> On Wed, Jul 22, 2020 at 11:21:29AM +0200, SZEDER Gábor wrote:
> > On Thu, Jul 02, 2020 at 04:06:32PM -0400, Taylor Blau wrote:
> > > +static void die_if_using_banned_filter(struct upload_pack_data *data)
> > > +{
> > > + struct list_objects_filter_options *banned = banned_filter(data,
> > > + &data->filter_options);
> > > + if (!banned)
> > > + return;
> > > +
> > > + packet_writer_error(&data->writer, _("filter '%s' not supported\n"),
> >
> > Should we really translate the content of the ERR packet?
>
> s/ERR packet/dying message after your other piece of advice, but I think
> so. This is eventually going to make its way to users, so translating it
> seems to make sense to me.
>
> I guess they would get it in the localization of the server, not the
> client, but that doesn't sway me away from this, either.Please note that the contents of other ERR packets are not translated, either.
$ git grep -A1 -h packet_writer_error origin/seen:upload-pack.c
packet_writer_error(&data->writer,
"upload-pack: not our ref %s",
--
packet_writer_error(&data->writer,
"upload-pack: not our ref %s",
--
packet_writer_error(writer,
"upload-pack: not our ref %s",
--
packet_writer_error(writer, "unknown ref %s", arg);
die("unknown ref %s", arg);Show 10 quoted lines
> > > + list_object_filter_config_name(banned->choice));
> > > + die(_("git upload-pack: banned object filter requested"));
> > > +}
> > > +
> > > static void receive_needs(struct upload_pack_data *data,
> > > struct packet_reader *reader)
> > > {
>
> Thanks,
> Taylor