User was banned for posting a reply within 3 seconds

I’ll re-try. I did run through the codepath, and all the assumptions I could find appeared to be valid based upon the values provided in site settings.

EDIT: I was able to repro using copy/paste on a second post with the settings provided above. I will reset them to defaults and see if I can find any correlation.

EDIT 2: I was able to find the issue.

https://github.com/discourse/discourse/blob/427d54b2b00fa94474c0522eaed750452c4e7f43/lib/new_post_manager.rb#L37-L45

In this block of code, we’re looking only at the user’s post_count. If a user creates a topic first, that’s not counted as a post. Therefore, when a user copy/pastes a reply, it’s counted as their first post, triggering the protection.

PR is up to fix

https://github.com/discourse/discourse/pull/8139

8 Likes