I am seeing spam being logged again despite having the plugin set to NOT log spam. This was working in version 1.4.

I am not much of a coder so I am loathe to attempt to fix this myself, but it's pretty obvious that the check was removed from protected_submissions.module in version 1.5. There were several lines checking for the variable `$log_rejected` that have been deleted in version 1.5.

Comments

Robert Gomez created an issue. See original summary.

altagrade’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for the report!

According to https://git.drupalcode.org/project/protected_submissions/commit/cc65c20 only language-related modifications and no log-related changes were made. Could you please completely disable and uninstall the module and then install the last version to see if it will work for you?

robert gomez’s picture

Ok, tried a clean re-install. Still not working.

I am not normally a git user, so excuse me if this isn't the proper way to report something like this... but if you look at this line in version 1.4:
https://git.drupalcode.org/project/protected_submissions/-/blob/8.x-1.4/...

And then compare to version 1.5 that was pushed:
https://git.drupalcode.org/project/protected_submissions/-/blob/8.x-1.5/...

The variable for the Log settings check was clearly removed from the code.

Also farther down you will also see that the check for this variable before logging was also removed:
Version 1.4, (line 510):

        // Save the new value.
        \Drupal::state()->set('protected_submissions.rejected', $rejected);
        // Log the rejected submission.
        if ($log_rejected == TRUE) {
          \Drupal::logger('protected submissions')->info('Rejected pattern:<em>'.$check_text.'</em>');
        }

Version 1.5 (line 504):

        // Save the new value.
        \Drupal::state()->set('protected_submissions.rejected', $rejected);
        \Drupal::logger('protected submissions')->info('Rejected pattern:<em>' . $check_text . '</em>');

I'm using version 1.5 to demonstrate when the change was made, but issue is in current version (1.6) too.

Again, I'm not much of a coder, so maybe this check was moved to another file. I don't know. All I know is that the spam is back to being added to my site logs after recently updating from version 1.4.

robert gomez’s picture

Any progress on this? I provided the info you wanted 2 months ago.

altagrade’s picture

Robert, thanks for the update and sorry it's taking so long. I am afraid our team is quite loaded with work these days. So you have to either wait for some more time (~ 1 month) or submit a patch for review.

  • f2211bc committed on 8.x-1.x
    Issue #3151424: "Log rejected submissions" Value No longer honored
    
altagrade’s picture

Status: Postponed (maintainer needs more info) » Fixed

Sorry this took so long, and please be informed the removed lines have been re-instated by the last commit: https://git.drupalcode.org/project/protected_submissions/commit/f2211bc Will release another version soon.

Status: Fixed » Closed (fixed)

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