From d97742570fce0512eddb6dc6c924d541aa4f57e4 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Fri, 29 Jan 2016 19:49:07 -0500 Subject: Increase the minimum length for commit SHA matching to 7 This is the git default and will help to prevent false positive matches. Closes #12706 --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index fdfdb449085..54cc338b605 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -490,7 +490,7 @@ Rails.application.routes.draw do end resource :avatar, only: [:show, :destroy] - resources :commit, only: [:show], constraints: { id: /[[:alnum:]]{6,40}/ } do + resources :commit, only: [:show], constraints: { id: /\h{7,40}/ } do member do get :branches get :builds -- cgit v1.2.3