Skip to content

Commit

Permalink
Mitigate potential denial of service issue by whitelisting bucket par…
Browse files Browse the repository at this point in the history
…ameter.
  • Loading branch information
steveyken committed Sep 10, 2022
1 parent e2097a2 commit b699660
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/polymorphic/task.rb
Expand Up @@ -189,6 +189,7 @@ def self.find_all_grouped(user, view)
#----------------------------------------------------------------------------
def self.bucket_empty?(bucket, user, view = "pending")
return false if bucket.blank? || !ALLOWED_VIEWS.include?(view)
return false unless Setting.task_bucket.map(&:to_s).include?(bucket.to_s)

if view == "assigned"
assigned_by(user).send(bucket).pending.count
Expand Down

0 comments on commit b699660

Please sign in to comment.