Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the Comment Blacklist to check Contact Form submissions for spam. #11037

Merged
merged 1 commit into from
Jan 2, 2019

Conversation

cfinke
Copy link
Contributor

@cfinke cfinke commented Dec 23, 2018

The Comment Blacklist is a means to moderate discussion. Contact forms are 1:1 discussion forums, ripe for abuse by users who have been removed from the public discussion, so we should respect any terms in the Comment Blacklist for contact form submissions.

At the very least, we should consider a contact-form-specific blacklist, if it isn't acceptable to use the Comment Blacklist.

Fixes #430

Changes proposed in this Pull Request:

  • This change would check contact form submissions for terms in the Comment Blacklist before checking them with Akismet, treating contact form submissions more like how WordPress core treats comments.

Testing instructions:

Before applying this patch:

  1. Add a term to the Comment Blacklist, like "bannedword".
  2. Submit the contact form, using "bannedword" in any or all of the contact form fields.
  3. Observe that the contact form submission succeeds.

After apply this patch:

  1. Submit the contact form multiple times, with and without "bannedword" in all of the different contact form fields.
  2. Observe that when "bannedword" is present, the contact form submission does not succeed, and when it is not present, the contact form submission succeeds.

Proposed changelog entry for your changes:

  • The Comment Blacklist is now used to filter Contact Form submissions.

The Comment Blacklist is a means to moderate discussion, and contact forms are 1:1 discussion forums, ripe for abuse by users who are being removed from the public discussion, so we should respect any terms in the Comment Blacklist for contact form submissions.

At the very least, we should consider a contact-form-specific blacklist, if it isn't acceptable to use the Comment Blacklist.
@matticbot
Copy link
Contributor

D22658-code. (newly created revision)

@jetpackbot
Copy link

Warnings
⚠️

The PR is missing at least one [Status] label. Suggestions: [Status] In Progress, [Status] Needs Review

This is automated check which relies on PULL_REQUEST_TEMPLATE.We encourage you to follow that template as it helps Jetpack maintainers do their job. If you think 'Testing instructions' or 'Proposed changelog entry' are not needed for your PR - please explain why you think so. Thanks for cooperation 🤖

Generated by 🚫 dangerJS against 88f7fe2

@cfinke cfinke added [Status] In Progress [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Tests] Needs Tests Some Unit Tests would be really useful to include with this PR. labels Dec 23, 2018
@jeherve jeherve added this to the 6.9 milestone Dec 24, 2018
@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jan 2, 2019
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works well for me. 👍

@dereksmart dereksmart merged commit e58750f into master Jan 2, 2019
@dereksmart dereksmart deleted the contact-form-blacklist branch January 2, 2019 19:06
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jan 2, 2019
jeherve added a commit that referenced this pull request Jan 3, 2019
jeherve added a commit that referenced this pull request Jan 3, 2019
* Add first version of the Changelog and testing list for 6.9

* Changelog: add #10710

* changelog: add #10538

* changelog: add #10741

* changelog: add #10749

* changelog: add #10664

* changelog: add #10224

* changelog: add #10788

* Changelog: add #10560

* Chanegelog: add #10812

* changelog: add #10556

* Changelog: add #10668

* Changelog: add #10846

* Changelog: add #10947

* Changelog: add #10962

* Changelog: add #10956

* Changelog: add #10940

* Changelog: add #10934

* Changelog: add #10912

* changelog: add #10866

* changelog: add #10924

* Changelog: add #10936

* Changelog: add #10833

* changelog: add #10867

* Changelog: add #10960

* Changelog: add #10888

* changelog: add #10840

* changelog: add #10972

* Changelog: add #10979

* changelog: add #10909

* Changelog: add #10958

* Changelog: add #10981

* Changelog: add #10564

* Changelog: add #10809

* Changelog: add #10982

* Changelog: add #10706

* Changelog: add #10978

* Changelog: add #10132

* Changelog: add #11022

* Changelog: add #11024

* Changelog: add #10875

* Changelog: add #11030

* Changelog: add #11053

* Changelog: add #10880

* Changelog: add #9359

* Changelog: add #11037

* Update block list

* Changelog: add #11060

* Changelog: add #10755

* changelog: add #11000

* Changelog: add #10786

* Changelog: add #10945

* Changelog: add #10597
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Contact Form [Tests] Needs Tests Some Unit Tests would be really useful to include with this PR. Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants