Been going through the user content module to try to fix some bugs, and I noticed this -- would appreciate if someone can confirm.
First, some background (since I figure I may be the only person that's looked at this stuff in a while, and the API's still not documented): spam uses the filter_fields hook to get what fields should be scanned from each module.
The return value of filter_fields is a two-item array: $filter['main'] and $filter['other'], each of which are themselves arrays of field names.
It looks like right now, spam.module is filtering on ['main'] but not on ['other']. A helper function is in there to scan on ['other'] (spam_get_text, i believe), but it currently looks like it's unimplemented.
This particularly matters to spam_content_user, since the sig is one of the places where spam's most likely to show up (as spam links), but it's in the ['other'] array.
Was torn between classifying this as a "bug" or "feature request;" guess it depends on how important we thing the fields in ['other'] (I think content_comment uses it too) are.
Comments
Comment #1
jeremy commentedThis is the relevant function definition:
Note that "$full" is set to TRUE by default, and that within this function if $full is TRUE we append the 'other' fields to the text that is scanned.
Finally, grepping through the spam filter code I see only two places this function is actually called:
In both cases, $full is left the default of TRUE.
In other words, filters are able to review the 'other' fields if appropriate, and currently two filters do so.
Comment #2
gnassar commentedThanks, Jeremy. Must've forgotten the -r on my grep. :) I caught spam_get_text, but didn't find it called anywhere.
I guess then all that remains of this is to either tell the URL filter to check on "all" or to promote the sig field in content_comments from 'other' to 'main'.
Comment #3
jeremy commented> all that remains of this is to either tell the URL filter to check on "all"
Right, I think it should be scanning all fields.
Comment #4
gnassar commented