mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
SECURITY: Don't allow a particular site to monopolize the defer queue
This commit is contained in:

committed by
David Taylor

parent
0736611423
commit
26e267478d
@ -225,4 +225,12 @@ RSpec.describe Hijack do
|
||||
|
||||
expect(ran).to eq(false)
|
||||
end
|
||||
|
||||
it "handles the queue being full" do
|
||||
Scheduler::Defer.stubs(:later).raises(WorkQueue::WorkQueueFull.new)
|
||||
|
||||
tester.hijack_test {}
|
||||
|
||||
expect(tester.response.status).to eq(503)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user