# 被禁言的用户可以通过匿名模式绕过限制

**URL:** <https://meta.discourse.org/t/silenced-user-can-circumvent-it-entering-anonymous-mode/320052>\
**Category:** Bug\
**Tags:** moderation, anonymous-mode\
**Created:** [2024年八月4日 13:08 UTC](https://meta.discourse.org/t/silenced-user-can-circumvent-it-entering-anonymous-mode/320052 "2024-08-04T13:08:47Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![ted](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ted/32/283882_2.png) [@ted](https://meta.discourse.org/u/ted)\
**Post date:** [2025年四月23日 08:39 UTC](https://meta.discourse.org/t/silenced-user-can-circumvent-it-entering-anonymous-mode/320052/19 "2025-04-23T08:39:44Z")

</div>

你好！ 👋

我们刚刚合并了一个修复程序，该程序可以确保在匿名模式下，此处会尊重所有者账户的“静默”状态：

> <https://github.com/discourse/discourse/pull/32416>
>
> \### What is the problem?
> 
> When a user is silenced they can, given they have th…e permissions, enter anonymous mode and keep posting, essentially bypassing the silence that way.
> 
> \### How does this fix it?
> 
> This change delegates the \`silenced\_till\` attribute to the main user record if the user is anonymous.
> 
> \### Trade-offs and alternative approaches
> 
> Given anonymous posting is enabled, as of this change, each call to \`silenced\_till\` will produce a minimal query to \`anonymous\_users\` to select one record based on pkey.
> 
> The alternative to this is to add logic to update the anonymous record's value when it is created and when a user is silenced or unsilenced.
> 
> Given this choice of a theoretical minimal performance impact on a lukewarm path and a significantly more involved implementation, I chose the former.

---

_[View the full topic](https://meta.discourse.org/t/silenced-user-can-circumvent-it-entering-anonymous-mode/320052)._
