When a form contains other form submit buttons, their labels are included as part of the post_body that is sent to Mollom.

An example for this is the mollom_test_form; it contains the button label "Add" in the post_body.

In D7, we can leverage form_state_values_clean() on a copy of $form_state['values'].

For D6, we need to backport that core helper function.

Comments

sun’s picture

Status: Active » Needs review
Issue tags: +Needs backport to D6
StatusFileSize
new5.6 KB

Attached patch fixes the issue.

Status: Needs review » Needs work

The last submitted patch, mollom.form-button-values.1.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new6.28 KB
sun’s picture

Status: Needs review » Reviewed & tested by the community
dries’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 7.x (master). Thanks sun!

I'm not sure it is important enough to backport to 6.x. Seems pretty harmless.

sun’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Patch (to be ported) » Needs review
StatusFileSize
new8.86 KB

I think it's important, since the button labels are not user input. Mollom's content classifiers take them into account when evaluating the spaminess, profanity, and quality of a post. I've seen such text fragments in several customer support tickets. Now, when considering that millions of posts are determined as spam every day, and these tokens get a negative spam classification, then there's a higher probability of mistakenly identifying a ham post as spam, just because of the button labels.

Status: Needs review » Needs work

The last submitted patch, mollom.form-button-values.6.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new10.84 KB

form_builder() in D6 destroys the $form_state['buttons'] information as soon as a button has been processed, so the backport wasn't trivial. However, attached patch should fix the issue.

sun’s picture

Status: Needs review » Reviewed & tested by the community
sun’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reporting, reviewing, and testing! Committed to 6.x-1.x.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 6907948 on master, fai6, 8.x-2.x, fbajs, actions by Dries:
    - Patch #1165360 by sun: form button labels/values are not removed from...

  • Commit 6907948 on master, fai6, 8.x-2.x, fbajs, actions by Dries:
    - Patch #1165360 by sun: form button labels/values are not removed from...