Skip to content

check that email match field is not empty before running email check on new user registrations#2

Closed
philscott-rg wants to merge 1 commit intojoho1968:masterfrom
philscott-rg:fix-email-matching-against-empty-value
Closed

check that email match field is not empty before running email check on new user registrations#2
philscott-rg wants to merge 1 commit intojoho1968:masterfrom
philscott-rg:fix-email-matching-against-empty-value

Conversation

@philscott-rg
Copy link
Copy Markdown

This fixes a case where new user registration can become inadvertently disabled if:

  • The Banned usernames field has a value
  • The Email must match field is empty

This results in:

  • The fail2wp_admin_check_new_user filter will be applied at l.422, because of the Banned usernames value
  • The email match check starting at l.1039 will always be run regardless of the field value, and defaults to invalid
  • The email match will always return invalid because there is no value to match against
  • New user registrations are then effectively disabled, as all emails are found to be invalid

…on new user registrations

This fixes a case where new user registration can become inadvertently disabled if:
- The `Banned usernames` field has a value
- The `Email must match` field is empty

This results in:
- The `fail2wp_admin_check_new_user` filter will be applied at l.422, because of the `Banned usernames` value
- The email match check starting at l.1039 will always be run regardless of the field value, and defaults to invalid
- The email match will always return invalid because there is no value to match against
- New user registrations are then effectively disabled, as all emails are found to be invalid
@joho1968 joho1968 added the enhancement New feature or request label Sep 2, 2024
@joho1968
Copy link
Copy Markdown
Owner

joho1968 commented Sep 2, 2024

Implemented for next version.

@joho1968 joho1968 closed this Sep 2, 2024
@joho1968 joho1968 self-assigned this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants