Security of lookups, links and receipts
The short answer
A guest finds an order only with its order number and the email address on the order. The module limits how often one visitor can try, and it answers a failed or blocked try in the same way, so a failed or limited try does not tell the visitor whether the order exists. With Pro, the magic link works only with a long random code, and the receipt verification page only with a fingerprint of the receipt; the customer receives both by email.
How it works
Finding an order without an account
On the withdrawal page, a guest enters the order number and the email address. Both must match the order. See Guest lookup without an account.
- A limit per visitor. One visitor can try 30 times an hour. The module tells visitors apart by their IP address and keeps only a fingerprint (a hash) of it for the count.
- The same answer every time. A wrong order number, a wrong email address and a blocked try all get the same "not found" answer, and the module makes each answer take at least the same minimum time.
- reCAPTCHA, if you want it. You can add Google reCAPTCHA to the lookup form with Enable for EU Withdrawal Lookup Form. It is off by default. See Settings: reCAPTCHA for the lookup form.
Submitting a request
One visitor can submit 10 withdrawal requests an hour. The count is kept per IP address, as for the lookup. Past the limit, the customer sees "Too many attempts from your connection. Please try again later or contact us." and no request is created.
Which IP address counts
The module takes the visitor's IP address from the connection to your web server. A visitor cannot change it by sending a made-up address in a request header. The same address is used for the lookup, request and receipt verification limits, and it is stored with each request, each cancellation and the customer's consents.
If your store runs behind your own load balancer, CDN or reverse proxy, every connection comes from that proxy. List its addresses in Trusted Proxies (Stores → Configuration → MageMe Extensions → EU Withdrawal → General). Only for a connection from a listed address does the module read the visitor's address from the X-Forwarded-For header. See Settings: General.
The module keeps both counts in Magento's cache. Flushing the cache resets them. This was read in the code, not tested.
Magic links (Pro)
Magic Link puts a one-click withdrawal link into the order and shipment emails. Each link carries a long random code. The module stores only a fingerprint of the code, not the code itself.
A link works as many times as needed until Token Lifetime (days) ends, 30 days by default. Turning Magic Link off doesn't stop the links you already sent: they keep working until their lifetime ends. See Magic Link.
The receipt verification page (Pro)
With Receipt Verify, the receipt contains a link to a verification page. The link carries the request number and a 64-character fingerprint of the receipt content. The page says whether the receipt matches what the store recorded. A match shows that the receipt content has not changed since the store sent it.
- One visitor can check 10 times an hour.
- Search engines are asked not to index the page, and browsers are asked not to keep a copy of it.
- When the receipt matches, the page shows the receipt number, the order number, the submission date, the items and the refund amounts. It doesn't show the customer's name. Anyone who has the link sees them.
See Receipt Verify.
What this means for you
- If bots try the lookup form, turn on reCAPTCHA for it.
- Whoever has access to the customer's mailbox can use the magic link and open the verification page. Choose a Token Lifetime (days) that covers your withdrawal period and not much more.
- If your store runs behind a proxy or a CDN, either enter its addresses in Trusted Proxies or have your developer set up the web server to pass each visitor's real IP address on. Do one of the two, or all visitors share one limit and every request is stored with the proxy's address. Magento's own proxy settings don't change what this module uses.
- List only proxies you run or pay for. An address in Trusted Proxies is trusted to report the visitor's address.
- Your staff's access to requests is a separate topic. See Roles and permissions.
What's next
- Guest lookup without an account: what the customer sees on the lookup form.
- Settings: reCAPTCHA for the lookup form: turn on reCAPTCHA.
- Magic Link: set up one-click links in your order emails.
- Privacy and personal data: what the module stores about each request.