edx/cs_comments_service — pull request #52 by jimabramson (2013-09-13 16:36:05+00:00)
Title: add simple filtering on inbound content based on a collection of forbidden content bodies

@cpennington @e0d @kevinchugh @mikigoyal @gwprice

This causes the comments service to error with 503 whenever the body of a created/edited post is blacklisted according to a simple normalization + hash function. The blacklisted hashes live in a mongo collection "blocked_hash" which is loaded once by each application worker at startup and stored in a global variable (this means the app must be restarted in order to pick up any updates to the collection).

The 503 error pre-empts the post content from being saved to the database or to the search index. The lms does not immediately display any error (on a new post, it appears to have succeeded), though subsequent actions may produce errors for the user who submitted the blocked post.