[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: authz changes between 1.9 and 1.10

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 30 Jul 2018 20:03:26 +0000

Philip Martin wrote on Mon, Jul 30, 2018 at 13:51:06 +0100:
> @@ -820,6 +833,13 @@ add_access_entry(ctor_baton_t *cb, svn_stringbuf_t
>
> SVN_ERR_ASSERT(acl != NULL);
>
> + if (svn_hash_gets(cb->rule_entries, name))
> + return svn_error_createf(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL,
> + _("Duplicate entry '%s' in authz rule [%s]"),
> + name, section->data);

A comment here explaining why this case needs to *remain* an error would be
helpful, otherwise I'm sure in a year or two someone will think "Hey, this case
is just a syntax error now, so it's fair game to make it a non-error and give
it a defined meaning"…

Maybe you were already planning to add a comment later.

Cheers,

Daniel

> + svn_hash_sets(cb->rule_entries,
> + apr_pstrmemdup(cb->rule_entries_pool, name, name_len), "");
> +
> if (inverted)
> {
> ++name;
>
> --
> Philip
Received on 2018-07-30 22:03:45 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.