提交 c3d48f97 编写于 作者: K kazubu

Fix: 500 error returned if destroy request without HTTP referer

上级 f66ec1bc
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册