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

[Sécurité] Limiter le nombre de soumissions possible du formulaire contact #2474

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

numew
Copy link
Collaborator

@numew numew commented Apr 16, 2024

Ticket

#2412

Description

  • Ajout d'une limitation de 3 soumission du formulaire de contact par tranche de 20 minutes et par IP

Pré-requis

make composer

Dans les variables d'env

CONTACT_FORM_LIMITER_LIMIT=3
CONTACT_FORM_LIMITER_INTERVAL='20 minutes'
LOCK_DSN=flock

Tests

  • Soumettre 4 fois le formulaire de contact et vérifier que la 4ème soumission est bloqué

Copy link
Collaborator

@emilschn emilschn left a comment

Choose a reason for hiding this comment

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

OK lecture et test

Comment on lines 5 to 6
limit: 3
interval: '20 minutes'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tu peux ajouter cela en variable d'env ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Surtout la limite, pour pouvoir changer en cas de tests ? L'intervale, c'est pas hyper important en variable d'env, si ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fait pour les deux (ca mange pas de pain)

Copy link

sonarcloud bot commented Apr 18, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

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

Tests OK, relecture OK

@hmeneuvrier hmeneuvrier merged commit 3b61e9c into develop Apr 19, 2024
3 checks passed
@hmeneuvrier hmeneuvrier deleted the feature/2412-add-rate-limit-on-contact-form branch April 26, 2024 10:27
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.

None yet

4 participants