Pull from Remote Repository allows self-reference

Summary

It is possible to enter the current repository name as the remote repository to mirror.

Steps to reproduce

  1. Go to https://gitlab.com/<org>/<project>/settings/repository
  2. Expand 'Pull from a remote repository'
  3. Enter https://gitlab.com/<org>/<project> as the remote repository, where https://gitlab.com/<org>/<project> is the same repository. Click Save.

Example Project

I did this unintentionally on https://gitlab.com/coala/package_manager/settings/repository , but it has been just disabled.

What is the current bug behavior?

The self-mirroring is allowed, and seems to work, but isnt sane.

What is the expected correct behavior?

UI prevents saving. Ideally there is also a cyclic check to prevent B mirroring A, and A mirroring B. The UI should error when A is trying to add a mirror which is a mirror that eventually loops back to A.

Relevant logs and/or screenshots

None.

Output of checks

This bug happens on GitLab.com

Edited Jun 23, 2017 by John Vandenberg
Assignee Loading
Time tracking Loading