On 15/05/10 06:26, Kurt Granroth wrote:
> FWIW, disabling the checkParents code is the very first thing I do when
> updating our mercurial-server installation (nested mq repos don't work
> with it) and everything has been fine.
>
> What kind of security issues are you thinking of?
I'm worried about attacks based on mixing up repositories and repository
contents, in either direction: checking in a directory called ".hg" with
repository-like subdirectories and relying on mercurial-server treating
it like a repository when it's checked out, or conversely appearing to
add files to a repository when what you're really adding is a new
repository.
The "hgadmin" repo is automatically updated to tip every time it's
pushed to, after which it gets used in refresh-auth. So one worry would
be that a malicious party could add keys to the keys directory by
cloning in a new repository within the "keys" subdirectory.
Perhaps it is a mistake for the hgadmin repository to be checked out "in
place" - perhaps I should use separate instances of it for sharing and
for accessing the contents? Or possibly hg already has safeguards
against the sort of problem I'm worrying about?