Skip to content

Fix 8323 hidden reply subjects - #9914

Open
boredskull wants to merge 2 commits into
SimpleMachines:release-3.0from
boredskull:fix-8323-hidden-reply-subjects
Open

boredskull wants to merge 2 commits into
SimpleMachines:release-3.0from
boredskull:fix-8323-hidden-reply-subjects

Conversation

@boredskull

Copy link
Copy Markdown

Description

This pull request addresses an issue where the post editor ignores the "Show subjects in topics" setting, allowing users to enter custom reply subjects even when they are hidden within topics.

This can be exploited by spammers to insert unwanted content into reply subjects that remains hidden within the topic but appears elsewhere, including recent posts and RSS feeds.

When the setting is disabled, this implementation automatically generates the reply subject using the original topic subject and the forum's default language response prefix.

Changes include:

  • Makes the subject field read-only when creating or editing replies.
  • Hides the subject field in the inline editing interface.
  • Enforces automatically generated reply subjects server-side, preventing circumvention through manually modified requests.
  • Applies the restriction to standard replies, quoted replies, quick replies, previews and draft submissions.
  • Preserves the existing ability to edit subjects when creating topics or modifying the first post.
  • Maintains existing functionality when "Show subjects in topics" is enabled.
  • Reuses SMF's existing response prefix, character encoding and subject length handling.
  • Prevents duplicate response prefixes.
  • Preserves existing posting and moderation permissions.

No database changes or additional configuration settings are required. Existing historical reply subjects are not automatically modified.

Testing:

The implementation has undergone an initial code review and isolated logic checks. Further testing on a running SMF 3.0 installation is recommended, particularly for drafts, previews, inline editing and multilingual forums.

Issues References (Fixes|Related|Closes)

  1. Fixes [3.0]: Post editor ignores "Show subjects in topic" #8323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[3.0]: Post editor ignores "Show subjects in topic"

1 participant