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

[UNO-809] Add honeypot to contact form #406

Merged
merged 1 commit into from
Nov 28, 2023
Merged

[UNO-809] Add honeypot to contact form #406

merged 1 commit into from
Nov 28, 2023

Conversation

orakili
Copy link
Contributor

@orakili orakili commented Nov 28, 2023

Refs: UNO-809

This adds the honeypot module and configures it for the contact us form.

Tests

  1. Checkout the branch, rebuild the image, clear the cache and import the config
  2. Go to the contact us page and inspect the page to confirm the honeypot_time fields is there
  3. Fill in the form, send and check mailpit (ex: http://mail.unocha-local.test) to confirm the email was sent
  4. Return to the contact us form, inspect the page, search for the form-wrapper element with style="display: none !important;", remove the style attribute to reveal the honeypot input field
  5. Fill in the form including the field above
  6. Send and confirm there is an error message and and a log message in the DB logs

Copy link

Coverage Report

Totals Coverage

Copy link

Build output

Composer Validate success

PHP Lint success

Docker Build success

Environment Setup success

Site Install success

PHP Code Sniffer success

Software Versions PHP 8.2.13 (cli) (built: Nov 24 2023 08:47:18) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.13, Copyright (c) Zend Technologies with Zend OPcache v8.2.13, Copyright (c), by Zend Technologies with Xdebug v3.2.1, Copyright (c) 2002-2023, by Derick Rethans Composer version 2.6.5 2023-10-06 10:11:52
Drupal Logs

Pusher: @orakili, Action: pull_request, Workflow: Run tests

@orakili orakili requested a review from left23 November 28, 2023 02:18
Copy link
Contributor

@left23 left23 left a comment

Choose a reason for hiding this comment

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

Works as described. On the second form submit attempt I get "Blocked submission of contact_message_contact_form due to submission of a value in the honeypot field." in the logs and an error message on the contact page prevent submission.

@left23 left23 merged commit 12fe38d into develop Nov 28, 2023
1 check passed
@left23 left23 deleted the UNO-809 branch November 28, 2023 12:11
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.

2 participants