Homec4science

Relax the same-origin check in the Git commit discovery daemon

Authored by epriestley <git@epriestley.com> on Dec 23 2011, 17:11.

Description

Relax the same-origin check in the Git commit discovery daemon

Summary:
Git accepts either "git@x:/path" or "ssh://git@x.com/path" URIs to mean the
exact same thing, which is causing some false positives and confusion,
particularly because we sometimes mutate URIs.

Since this is just a sanity check, we don't really care about the username,
domain or credentials -- matching the paths is good enough. We're just trying to
make it hard to shoot yourself in the foot by copy-pasting the same local path
into two repositories and forgetting to change one, like I did. :P

Relax the check to only verify the paths are the same.

Test Plan:

  • Ran unit tests, which should fully cover things.
  • Ran commit discovery daemon in debug mode on incorrectly and correctly

configured repositories.

Reviewers: ajtrichards, jungejason, btrahan

Reviewed By: jungejason

CC: aran, jungejason

Maniphest Tasks: T710

Differential Revision: https://secure.phabricator.com/D1279

Details

Committed
epriestley <git@epriestley.com>Dec 24 2011, 17:54
Pushed
aubortJan 31 2017, 17:16
Parents
rPHcacdfcc8ead1: Remove unused PhabricatorProfileView
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHe786c44b6ffe: Relax the same-origin check in the Git commit discovery daemon (authored by epriestley <git@epriestley.com>).Dec 24 2011, 17:54