From 167a6b9eefd2076d08b4f1504f8b5ff3fb281026 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Mon, 6 Apr 2015 23:02:06 -0400 Subject: Render a 404 when RefsController#logs_tree gets an HTML request Fixes #2152 --- app/controllers/projects/refs_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index 67acf45ab7f..ec3b2b8d75a 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -55,5 +55,10 @@ class Projects::RefsController < Projects::ApplicationController commit: last_commit } end + + respond_to do |format| + format.html { render_404 } + format.js + end end end -- cgit v1.2.3