> In svn_repos_fs_change_rev_prop3 the code first gets the old property
> value which it uses to calculate the action: 'A', 'M' or 'D'. Then it
> passes the action to the pre-revprop-change hook, then it changes the
> property and finally it runs the post-revprop-change hook. Some
> other process can change the revprop at any time so although the
> pre-revprop-change hook might get passed an 'A' say, when the change
> is made it could be effectively an 'M'. The action passed to the
> hook is not a reliable indication of the change to be made.
pre-revprop-change is mainly useful for access control, and I think for
the most part the three cases that can happen here ('A' becoming 'M'
due to another add; 'M' becoming 'A' due to a delete; or any action
becoming a no-op due to someone else doing the same action) are
harmless in that sense.
Unless, I suppose, you have an attacker who has permission to modify
but not add a property, and he wishes to make sure the property is not
deleted, so he modifies the property in a tight loop in hopes of racing
with whoever wants to delete it, hoping to end up re-adding it without
Seems a bit far-fetched. I dunno.
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
Received on 2010-06-09 18:11:02 CEST