diff options
author | kazubu <kazubu@jtime.net> | 2015-10-26 00:02:32 +0900 |
---|---|---|
committer | kazubu <kazubu@jtime.net> | 2015-10-26 15:06:55 +0900 |
commit | c3d48f97355371d6c8760e05637f666f23c2a76a (patch) | |
tree | 31d83e9fa642c79c14211a68b5c73293efef6528 /app | |
parent | f66ec1bc8157e5481ba23660b226267293c85129 (diff) | |
download | gitlab-ce-c3d48f97355371d6c8760e05637f666f23c2a76a.tar.gz |
Fix: 500 error returned if destroy request without HTTP referer
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 82119022cf9..743c429b72e 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -124,7 +124,7 @@ class ProjectsController < ApplicationController ::Projects::DestroyService.new(@project, current_user, {}).execute flash[:alert] = "Project '#{@project.name}' was deleted." - if request.referer.include?('/admin') + if request.referer.present? && request.referer.include?('/admin') redirect_to admin_namespaces_projects_path else redirect_to dashboard_projects_path |