Ticket #2840 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Comments RSS does not respect filtering done by the_posts hook

Reported by: coppit Assigned to: rob1n
Priority: normal Milestone: 2.2
Component: General Version: 2.1
Severity: normal Keywords:
Cc:

Description

The comments RSS should only provide comments for posts that are actually visible after filtering. To see the problem:

1. Create a plugin that uses the the_posts hook to filter the list of posts. Have it return an empty array. 2. Look at http://www.example.com/blog/comments/feed/ and you will see all your comments for supposedly filtered posts.

If you don't want to create a plugin, you can use my category access plugin: http://www.coppit.org/code/category-access-0.5.3.zip. Just set the default access to none to restrict all posts in all categories.

I believe the solution is to modify the SQL in wp-commentsrss2.php, adding a WHERE clause that restricts the query to only those posts that are returned from the_posts.

Change History

08/30/06 23:50:14 changed by mdawaffe

  • milestone set to 2.1.

I wrote an old patch at #2485 to address this.

12/01/06 10:44:02 changed by matt

  • milestone changed from 2.1 to 2.2.

02/23/07 23:53:14 changed by rob1n

  • owner changed from anonymous to rob1n.
  • status changed from new to assigned.
  • version set to 2.1.

02/24/07 08:43:39 changed by rob1n

  • status changed from assigned to closed.
  • resolution set to fixed.

I believe this was fixed when #2485's changes went in.