# Users can edit flagged topic title when they should not be able to

**URL:** <https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796>\
**Category:** Bug\
**Created:** [February 10, 2022, 4:07pm UTC](https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796 "2022-02-10T16:07:40Z")\
**Posts on this page:** 8\
**Page:** 1

## AI-generated summary

A bug has been reported where users can edit the title of a flagged topic, even when they shouldn't be able to. [Tris20](/t/-/217796/1) explains that when a post is reported and hidden by a moderator, the user can still edit the title, which allows them to bypass the cooldown period and potentially make the post visible again. [JammyDodger](/t/-/217796/3) confirms they can replicate this issue, and [Tris20](/t/-/217796/4) clarifies that the intention is to allow users to edit the post after a cooldown period, but editing the title circumvents this timer. [IAmGav](/t/-/217796/7) suggests that a specific line of code may be responsible for overriding the hidden and cooldown checks. [codinghorror](/t/-/217796/8) requests that the issue be assigned to @sam, as there is a clear repro of the bug.

<div class="post-metadata">

**Author:** ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)\
**Post date:** [February 10, 2022, 4:07pm UTC](https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796/1 "2022-02-10T16:07:40Z")

</div>

# 1. Topic is reported

A topic is reported as “something else”, which here we have renamed as "this topic contains something it shouldn’t.

# 2. Moderator hides the post

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/2/d2be324d47085ba802f6f75f70b0d1a6bf8e19af.png)

# 3. Post is hidden

Post is hidden and cannot be edited – the timeout was set to 525600minutes

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/8/484fdd7af1e94fd0c764a486cb73e7eadd0dcf56.png)  
Which is fine, unless they edit the title:

![confidentiality_bug](https://global.discourse-cdn.com/meta/original/3X/7/7/77f9847211854fb2629cc2894e6b782b6cd89c5e.gif)

---

<div class="post-metadata">

**Author:** ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)\
**Post date:** [February 10, 2022, 4:18pm UTC](https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796/2 "2022-02-10T16:18:56Z")

</div>

this is not a bug. it was designed to be like that.

If you read the description of the hide post, you will see that a msg is sent to the user to edit the post.

The mod should either Agree \> Keep Post or Delete Post

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [February 10, 2022, 4:21pm UTC](https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796/3 "2022-02-10T16:21:52Z")

</div>

I can replicate this.

Editing the title of a hidden OP circumvents the 10 minute edit cool down period.

- TL0 test user creates topic that’s inappropriate
- The OP is flagged, and then hidden by moderator
- TL0 test user can immediately edit title and unhide post (and then edit the post content as well)

---

<div class="post-metadata">

**Author:** ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)\
**Post date:** [February 10, 2022, 4:22pm UTC](https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796/4 "2022-02-10T16:22:43Z")

</div>

Hmm, my discription could have been better. Yes, it is designed such that they can edit the post, but the ability to edit is locked behind a cooldown timer.

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/e/1ef86748bfe46bd476544ad399ae179f013402ff.png)

In 3 we can see that this works, the post is locked and cannot be edited because the timer has not expired. However, the user can get around the timer if they edit the title. That’s the bug.

I should mention this is with a TL1 user

---

<div class="post-metadata">

**Author:** ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)\
**Post date:** [February 10, 2022, 4:27pm UTC](https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796/5 "2022-02-10T16:27:10Z")

</div>

> [@Tris20](#):
>
> 525600minutes

you want to block the post for an year before they can edit it ? makes no sense.

just delete the post

---

<div class="post-metadata">

**Author:** ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)\
**Post date:** [February 10, 2022, 4:30pm UTC](https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796/6 "2022-02-10T16:30:21Z")

</div>

It’s a work around. We want the user to see the topic so they can retrieve the good contents from it and create a new one. After they are done with it we can delete the topic.

The problem is that if we let them edit the topic:

1. It will be reposted
2. The Confidential information will be visible in the Version History

---

<div class="post-metadata">

**Author:** ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)\
**Post date:** [February 10, 2022, 4:41pm UTC](https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796/7 "2022-02-10T16:41:09Z")

</div>

Seems like this line overrides the hidden & cooldown check

> <https://github.com/discourse/discourse/blob/c4843fc1c18fc9fb077d61e59615f54c4735bb42/lib/guardian/post_guardian.rb#L167>

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [February 11, 2022, 7:22pm UTC](https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796/8 "2022-02-11T19:22:22Z")

</div>

> [@JammyDodger](#):
>
> Editing the title of a hidden OP circumvents the 10 minute edit cool down period.
> 
> - TL0 test user creates topic that’s inappropriate
> - The OP is flagged, and then hidden by moderator
> - TL0 test user can immediately edit title and unhide post (and then edit the post content as well)

We have a repro, can this be assigned @sam?
