awesomemotive / wp-mail-logging

:envelope: Logs each email sent by WordPress.
49 stars 26 forks source link

Fix: Missing Security Checks for AJAX Accessible Functions #163

Closed donmhico closed 1 year ago

donmhico commented 1 year ago

Description

This PR fixes the missing security checks in AJAX dismiss features.

Motivation

Fixes #159.

Testing Procedure

This PR affects 2 dismiss notice actions. Dismissing both should work as intended and shouldn't produce any issues or errors in the logs.

Product Education Banners

Screen Shot 2023-05-04 at 20 08 00

User Feedback Notice

Screen Shot 2023-05-04 at 20 21 01

Follow these steps to see the User Feedback Notice:

  1. Find and delete the option wp_mail_logging_user_feedback_notice in your wp_options table.
  2. Then find the option wp_mail_logging_activated_time in your wp_options. It should have a timestamp value like 1483200175. You can just subtract 1 in the second to the left value, in my case I updated the value to 1383200175. This will simulate that the plugin was activated some time ago.
  3. Make sure that your WP Mail Logging has at least 10 email logs.