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

Re: [PATCH] stricter parsing of values in authz files

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-04-28 21:10:25 CEST

On 4/27/06, Peter N. Lundblad <peter@famlundblad.se> wrote:
> Garrett Rooney writes:
> > I'm not overly thrilled with this, since it doesn't actually error out
> > when an unexpected character is found (it just stops parsing). The
> > enumeration functions don't actually allow you to return an error, so
> > currently the only way to do so is to stash an error in the baton and
> > look at it later, which seems kind of hacky.
>
> What's hacky about that? But...
>
> > Plus, I'm not positive
> > if we'd want to explicitly error out, although silently accepting
> > invalid input seems bad as well.
> >
> Why would we want to silently accept invalid input in a file that controls
> authorization? I suggest putting this check in authz_validate_rule, where
> we currently validate that a rule don't refer to a non-existent group.

You've convinced me. How about this?

-garrett

[[[
Make sure that the authz rules don't contain any unexpected characters.

* subversion/libsvn_repos/authz.c
  Include apr_lib.h.
  (authz_validate_rule): Check that there are no unexpected characters in
   the rule.

* subversion/tests/cmdline/authz_tests.py
  (broken_authz_file): New test.
  (test_list): Run new test.
]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Fri Apr 28 21:10:52 2006

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.