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 | |
parent | f66ec1bc8157e5481ba23660b226267293c85129 (diff) | |
download | gitlab-ce-c3d48f97355371d6c8760e05637f666f23c2a76a.tar.gz |
Fix: 500 error returned if destroy request without HTTP referer
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index 53da0148ff3..2b69b383603 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,6 +12,7 @@ v 8.2.0 (unreleased) - Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork - Use git follow flag for commits page when retrieve history for file or directory - Show merge request CI status on merge requests index page + - Fix: 500 error returned if destroy request without HTTP referer (Kazuki Shimizu) v 8.1.0 - Ensure MySQL CI limits DB migrations occur after the fields have been created (Stan Hu) 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 |