WordPress.org

Make WordPress Core

Opened 15 months ago

Last modified 15 months ago

#23231 new defect (bug)

preprocess_comment should get the normalised comment data

Reported by: westi Owned by:
Milestone: Awaiting Review Priority: low
Severity: minor Version: 3.5
Component: Comments Keywords: needs-patch westi-like easy
Focuses: Cc:

Description

In wp_new_comment we normalise some data like user_ID/user_id so that we support people providing both versions but we fire the filter to preprocess the comment first.

This means if someone writes a filter they have to re-implement this normalisation if they want to filter the comment data properly.

An example of where this currently goes wrong is when Akismet tries to fetch the roles of the user submitting the comment - http://plugins.trac.wordpress.org/browser/akismet/tags/2.5.7/akismet.php#L332

This only works if the comment comes via a route that supplies the data correctly and not one that doesn't.

Change History (1)

comment:1 westi15 months ago

There is some history as to why we support both in #11222 / [12267] / [12300]

Note: See TracTickets for help on using tickets.