subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Shahaf <...@daniel.shahaf.name>
Subject Re: authz changes between 1.9 and 1.10
Date Mon, 30 Jul 2018 20:03:26 GMT
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

Mime
View raw message