# 用户在不应允许的情况下可以编辑被标记的话题标题

**URL:** https://meta.discourse.org/t/users-can-edit-flagged-topic-title-when-they-should-not-be-able-to/217796
**Category:** Bug
**Created:** [2022 年2 月 10 日 16:07 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

<div class="post-metadata">

### 作者： ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### 发布日期： [2022 年2 月 10 日 16:07 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. 主题被举报

主题被举报为“其他内容”，我们已将其重命名为“此主题包含不应有的内容”。

# 2. 版主隐藏帖子

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

# 3. 帖子被隐藏

帖子被隐藏且无法编辑——超时设置为 525600 分钟

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/8/484fdd7af1e94fd0c764a486cb73e7eadd0dcf56.png)  
除非他们编辑标题，否则这没关系：

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

---

<div class="post-metadata">

### 作者： ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### 发布日期： [2022 年2 月 10 日 16:18 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>

这不是一个 bug。它是按设计如此的。

如果您阅读了隐藏帖子的描述，您会看到会向用户发送一条消息以编辑帖子。

版主应该选择“同意”\>“保留帖子”或“删除帖子”。

---

<div class="post-metadata">

### 作者： ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### 发布日期： [2022 年2 月 10 日 16:21 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>

我可以复制这一点。

编辑隐藏的主题帖标题可以绕过10分钟的编辑冷却时间。

- TL0测试用户创建不当主题帖
- 主题帖被标记，然后被版主隐藏
- TL0测试用户可以立即编辑标题并取消隐藏帖子（然后也可以编辑帖子内容）

---

<div class="post-metadata">

### 作者： ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### 发布日期： [2022 年2 月 10 日 16:22 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>

嗯，我的描述本可以更好。是的，它的设计允许用户编辑帖子，但编辑功能被冷却计时器锁定。

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

在 3 中，我们可以看到这是有效的，帖子被锁定且无法编辑，因为计时器尚未过期。但是，如果用户编辑标题，他们就可以绕过计时器。这就是 bug。

我应该提到这是一个 TL1 用户。

---

<div class="post-metadata">

### 作者： ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### 发布日期： [2022 年2 月 10 日 16:27 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](#):
>
> 525600分钟

你想阻止他们一年内编辑帖子？没有意义。

直接删除帖子。

---

<div class="post-metadata">

### 作者： ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### 发布日期： [2022 年2 月 10 日 16:30 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>

这是一个变通方法。我们希望用户能看到该主题，以便他们从中检索有用的内容并创建一个新主题。在他们完成后，我们可以删除该主题。  
如果我们允许他们编辑该主题，则会存在以下问题：  
1）它将被重新发布  
2）机密信息将在版本历史记录中可见

---

<div class="post-metadata">

### 作者： ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### 发布日期： [2022 年2 月 10 日 16:41 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>

看起来这行代码会覆盖隐藏和冷却时间检查

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

---

<div class="post-metadata">

### 作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### 发布日期： [2022 年2 月 11 日 19:22 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](#):
>
> 编辑隐藏帖子的标题可以绕过10分钟的编辑冷却时间。
> 
> - TL0测试用户创建不当主题
> - 帖子被标记，然后被版主隐藏
> - TL0测试用户可以立即编辑标题和取消隐藏帖子（然后也可以编辑帖子内容）

我们已经复现了，@sam 可以分配给您吗？
