opnform-host-nginx/api
Chirag Chhatrala 7365479c83
Email spam security (#641)
* Add hCaptcha on register page

* register page captcha test cases

* Refactor integration validation rules to include form context

- Updated the `getValidationRules` method in various integration handlers (Discord, Email, Google Sheets, Slack, Webhook, Zapier) to accept an optional `Form` parameter, allowing for context-aware validation.
- Enhanced the `EmailIntegration` handler to enforce restrictions based on user plans, ensuring free users can only create one email integration per form and can only send to a single email address.
- Added a new test suite for `EmailIntegration` to validate the new restrictions and ensure proper functionality for both free and pro users.
- Introduced loading state management in the `IntegrationModal` component to improve user experience during save operations.

These changes improve the flexibility and user experience of form integrations, particularly for email handling.

* for self-hosted ignore emil validation for spam

* fix pint

* ignore register throttle for testing env

* support new migration for mysql also

* Register page captcha enable if captcha key set

* fix test case

* fix test case

* fix test case

* fix pint

* Refactor RegisterController middleware and update TestCase setup

- Removed environment check for throttling middleware in RegisterController, ensuring consistent rate limiting for the registration endpoint.
- Updated TestCase to disable throttle middleware during tests, allowing for more flexible testing scenarios without rate limiting interference.

* Enhance hCaptcha integration in tests and configuration

- Added hCaptcha site and secret keys to phpunit.xml for testing purposes.
- Updated RegisterTest to configure hCaptcha secret key dynamically, ensuring proper token validation in production environment.

These changes improve the testing setup for hCaptcha, facilitating more accurate simulation of production conditions.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-18 13:16:27 +01:00
..
app Email spam security (#641) 2024-12-18 13:16:27 +01:00
bootstrap Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
config Enhance language support and fix validation messages 2024-12-09 12:47:01 +01:00
database Email spam security (#641) 2024-12-18 13:16:27 +01:00
public Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
resources Improve Integration Cards (#643) 2024-12-18 13:07:19 +01:00
routes Send mobile editor email (#634) 2024-12-12 11:19:09 +01:00
storage Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
tests Email spam security (#641) 2024-12-18 13:16:27 +01:00
.env.docker GH issue template, docker cache fix, remove docker client entrypoint 2024-09-04 11:19:03 +02:00
.env.example Feature flags (#543) 2024-08-27 16:49:43 +02:00
.gitignore Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
_ide_helper_models.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
artisan Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
composer.json Reduce docker api image size, fix issues 2024-08-28 15:20:39 +02:00
composer.lock Custom SMTP Settings (#561) 2024-09-24 12:16:20 +02:00
phpunit.xml Email spam security (#641) 2024-12-18 13:16:27 +01:00
pint.json Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
server.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
vapor.yml Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00