Skip to content

Commit 6b0ef26

Browse files
committed
Mitigate potential denial of service issue by whitelisting bucket parameter.
1 parent c8686ae commit 6b0ef26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/models/polymorphic/task.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ def self.find_all_grouped(user, view)
188188
#----------------------------------------------------------------------------
189189
def self.bucket_empty?(bucket, user, view = "pending")
190190
return false if bucket.blank? || !ALLOWED_VIEWS.include?(view)
191+
return false unless Setting.task_bucket.map(&:to_s).include?(bucket.to_s)
191192

192193
if view == "assigned"
193194
assigned_by(user).send(bucket).pending.count

0 commit comments

Comments
 (0)