mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:31:10 +08:00
SECURITY: Ensure users can see the topic before setting a topic timer. (#10841)
This commit is contained in:
@ -453,6 +453,7 @@ class TopicsController < ApplicationController
|
||||
params.require(:duration) if based_on_last_post
|
||||
|
||||
topic = Topic.find_by(id: params[:topic_id])
|
||||
guardian.ensure_can_see!(topic)
|
||||
guardian.ensure_can_moderate!(topic)
|
||||
|
||||
options = {
|
||||
|
Reference in New Issue
Block a user