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

Fix: Prevent error with unsaved or malformed email whitelist #7509

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

kjohnson
Copy link
Member

Resolves GIVE-1153

Description

This PR prevents non-array values from causing an error when validating against whitelisted email addresses.

Affects

Adds a type hint when constructing the whitelist.
Adds a type cast when resolving the whitelist from the container.

Testing Instructions

  1. In a new site install and active Akismet and GiveWP.
  2. Do NOT touch the Akismet settings in GiveWP.
  3. Try to make a donation on a V3 form with the Test Donation gateway

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Self Review of code and UX completed

@kjohnson kjohnson changed the base branch from develop to master August 21, 2024 18:48
@kjohnson
Copy link
Member Author

@kjohnson kjohnson marked this pull request as ready for review August 21, 2024 18:49
Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

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

Passed manual QA tests.

@jonwaldstein jonwaldstein merged commit ffe41a3 into master Aug 22, 2024
20 checks passed
@jonwaldstein jonwaldstein deleted the fix/donation-spam-akismet-whitelist-array-2-1153 branch August 22, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants