From c165b38a91acbdf8111cfe19cb33fe640ba9d7f6 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 26 Dec 2016 16:25:39 -0600 Subject: [PATCH] Prevent anon users from attempting to undelete/unvote comments. The :undelete and :unvote actions weren't covered. --- app/controllers/comments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 5069221a2..49ef61524 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -1,6 +1,6 @@ class CommentsController < ApplicationController respond_to :html, :xml, :json - before_filter :member_only, :only => [:update, :create, :edit, :destroy] + before_filter :member_only, :except => [:index, :search, :show] rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception def index