Skip to content

Setting a project's "path" to a dot/fullstop/period (".") makes it inaccessible

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

GitLab allows a user to configure a project's path to nothing more than a "." (without quotes). This causes the project to become inaccessible (presumably due to the dot being interpreted as meaning "current path", rather than a literal dot).

Steps to reproduce

  1. Create a project.
  2. Navigate to project's settings.
  3. Set the path to "." (without quotes).

Example Project

My private project with the name "dotfiles" on GitLab.com. What the URL probably would be: https://gitlab.com/Kage-Yami/.

(I'll be creating a support ticket to assist with my particular case).

My issue has been resolved thanks to the workaround added by Lyle K, so this example is no longer valid.

What is the current bug behavior?

I was able to set the project path to "." without error, causing the project to become inaccessible. Attempting to access the project takes me to my profile page: https://gitlab.com/Kage-Yami

What is the expected correct behavior?

I can access my project, or I should've never been able to set the path to ".".

Output of checks

This bug happens on GitLab.com

Possible fixes

I believe paths should be validated (similar to project name) to prevent the path being set to something stupid.

Workarounds

You can re-rename the project through the API by generating a personal access token and issuing:

curl --location --request PUT 'https://gitlab.com/api/v4/projects/<REPLACE PROJECT ID HERE>?id=<REPLACE PROJECT ID HERE>&path=a-better-name' --header "PRIVATE-TOKEN: <your_access_token>"

https://docs.gitlab.com/ee/api/projects.html#edit-project

Edited by 🤖 GitLab Bot 🤖