mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 11:37:14 +00:00
Enforce stricter class filtering in WatchersController (35463).
Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@21235 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a0ef175ffe
commit
04e27aa161
@ -158,7 +158,9 @@ class WatchersController < ApplicationController
|
||||
rescue
|
||||
nil
|
||||
end
|
||||
return unless klass && klass.respond_to?('watched_by')
|
||||
return unless klass && Class === klass # rubocop:disable Style/CaseEquality
|
||||
return unless klass < ActiveRecord::Base
|
||||
return unless klass < Redmine::Acts::Watchable::InstanceMethods
|
||||
|
||||
scope = klass.where(:id => Array.wrap(params[:object_id]))
|
||||
if klass.reflect_on_association(:project)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user