From d03cec0e697418482890f943dd5424e7a8a170be Mon Sep 17 00:00:00 2001 From: "J. Daniel Schmidt" Date: Wed, 8 Apr 2015 15:53:07 +0200 Subject: clean_path should drop all leading dashes, not just one --- app/models/namespace.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 8d9a85750ec..a0d79d7e5c0 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -61,7 +61,7 @@ class Namespace < ActiveRecord::Base def clean_path(path) path.gsub!(/@.*\z/, "") path.gsub!(/\.git\z/, "") - path.gsub!(/\A-/, "") + path.gsub!(/\A-+/, "") path.gsub!(/\.+\z/, "") path.gsub!(/[^a-zA-Z0-9_\-\.]/, "") -- cgit v1.2.1