---
title: "Discussion on \"One free trial per person in Laravel: normalise Gmail dots and plus tags, then enforce it in the database\" | Hashnode"
description: "Discussion on \"One free trial per person in Laravel: normalise Gmail dots and plus tags, then enforce it in the database\". A free trial that hands out credits on signup has a simple loophole. Gmail ignores dots in the local part and drops anything after a plus sign, and it treats googlemail.com as the same mailbox as gmai"
url: "https://hashnode.com/posts/one-free-trial-per-person-in-laravel-normalise-gmail-dots-and-plus-tags-then-enforce-it-in-the-database/6ad0d1c776fe9a8e622c5926"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [One free trial per person in Laravel: normalise Gmail dots and plus tags, then enforce it in the database](https://elijahbrown.hashnode.dev/one-free-trial-per-person-in-laravel-normalise-gmail-dots-and-plus-tags-then-enforce-it-in-the-database?utm_source=hashnode&utm_medium=feed)

A free trial that hands out credits on signup has a simple loophole. Gmail ignores dots in the local part and drops anything after a plus sign, and it treats googlemail.com as the same mailbox as gmai

Oct 15 · 8 min read · elijahbrown.hashnode.dev  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#php](https://hashnode.com/tag/php)
-   [#security](https://hashnode.com/tag/security)

## Written by

[Elijah Brown](https://hashnode.com/@elijahbrown)

@elijahbrown · Dubai, UAE

  
[View profile](https://hashnode.com/@elijahbrown)

Building Orisift. Writing about DNS, phones and forms.

I'm building Orisift, a developer API that checks phone numbers, email domains and IP addresses against reference data, and says what it couldn't find out. I write about the small standards details that decide how forms behave.

## Responses 1

Markdown supported · ⌘↵ to post

[Kamran Khan](https://hashnode.com/@kamrankhandev)

[Oct 16](https://hashnode.com/posts/one-free-trial-per-person-in-laravel-normalise-gmail-dots-and-plus-tags-then-enforce-it-in-the-database/6ad0d1c776fe9a8e622c5926/comment/6ad227c0c108876913ec1050)

This is the rare anti-abuse post that takes the database seriously — the four-process race test is what sells it. Most people stop at the validation rule and call it done.

One improvement I'd consider: store an HMAC of the normalised email instead of the normalised email itself. `hash_hmac('sha256', $normalised, config('app.key'))` keeps the unique index doing exactly the same job, but a database dump no longer hands out everyone's email addresses from a table literally named `trial_claims`.

The tradeoffs are real: you can't eyeball which email claimed which trial from the table anymore, so keep a short-lived audit log elsewhere if support ever needs that, and rotating the app key invalidates all claims. But for a fraud-adjacent table, not storing emails at rest is worth it.
