2

I'm creating a page where a customer can edit their order before they pay for it. The page will delete as soon as the order is paid for, but what's the best way to protect against email/phone number collecting bots? It needs to contain the email address and/or phone number. There is no way around that. (Shipping address also.)

Although the page will expire within minutes in most cases, I still want a customer to be safe if they choose to place an order now and pay for it several months later. (The nature of my business is that knowing what you would like to order may take a bit of effort and research, which a customer would not want to repeat if they decide to delay their order until they can afford to pay for it.)

Also, the site currently has no log on system. I will develop one eventually, but even once I do, I always want anonymous purchasing to be an option. A customer should be able to edit their order at any time from the link emailed to them without creating a username/password.

Before I had this concern, I was going to have it be www.domainexample.com?id=7, but any bot could check id=6 and id=5 to see if they've been shipped yet, and id=8 to see if there is a new order yet.

How can I provide a similar level of protection against email address theft that larger more professional sites like eBay would offer? (If that's even possible with anonymous purchasing. I hope it is.)

Anyone offering language-specific advice, I am coding in php/javascript/html. Though I'm sure I can look up the php equivalent of any suggestions offered.

Edit:

Important detail I forgot to mention. The target audience is old ladies that can barely use a computer at all. Any security feature that impacts the user experience could cost hundreds of dollars in missed sales as the website becomes too intimidating to use.

2

Before I had this concern, I was going to have it be www.domainexample.com?id=7, but any bot could check id=6 and id=5 to see if they've been shipped yet, and id=8 to see if there is a new order yet.

Generate a long, random ID. If you for instance generate a version 4 UUID it'll be unique and not guessable. Anyone with the URL can access it, but it's infeasible to guess the link.

The UUID is essentially the authentication in this case.

  • Good answer. I'll wait a bit longer before choosing the correct answer, but this is definitely a contender. – Jonathon Philip Chambers Aug 19 '18 at 7:37
2

Also, the site currently has no log on system. I will develop one eventually, but even once I do, I always want anonymous purchasing to be an option. A customer should be able to edit their order at any time from the link emailed to them without creating a username/password.

You can implement something like OTP technique (one-time password). For instance you add a session specific parameters to the link you send to the user. Each time the client uses the link to access the page the system generates the same link but with different session param values for the next access. Third parties including bots will not be able to reach anonymous purchase data.
The parameters values in the link must be random and unique for each session.

Before I had this concern, I was going to have it be www.domainexample.com?id=7, but any bot could check id=6 and id=5 to see if they've been shipped yet, and id=8 to see if there is a new order yet.

In this case you may consider two levels of protection :

  • On the first level your system should prevent bots from accessing the web page, this can be implemented by presenting a challenge, something like Captcha.
  • On the second level, make impossible for bots to collect sensitives content like emails that are displayed in raw strings (selectable using cursor), this can be done by displaying strings in form of images. There are already a couple of libraries for this matter php display string into image.
  • Regardless of the appropriateness of this solution to my project, I must acknowledge the expertise and effort you displayed. The OTP technique is nice, but I want a link that can be accessed from an email. Captcha, the cure is worse than the disease. Text as images... I don't see a down side. I like it. Using that idea. – Jonathon Philip Chambers Aug 19 '18 at 11:20
  • but I want a link that can be accessed from an email, still you can inspire from OTP, doesn't your system send automatically emails to the client ? – elsadek Aug 19 '18 at 11:24
  • Then perhaps I didn't understand your solution. Yes, it automatically sends emails. Though I would not want to send a new email every time the user makes an edit or views the page. Is that what you were suggesting? Or have I misunderstood again? – Jonathon Philip Chambers Aug 19 '18 at 11:28
  • 1
    One key bit of information I probably shouldn't have omitted is that this is a shop mostly for old ladies, who can barely use a computer at all. Even the slightest quirk in the user experience could cost this site hundreds of dollars in missed sales as old ladies become too intimidated by the confusing website. (Hence the no Captcha) – Jonathon Philip Chambers Aug 19 '18 at 11:33
  • Is that what you were suggesting? Or have I misunderstood again? indeed this is how I see it as solution for not logged-in users, otherwise any third party could have access to purchase page. – elsadek Aug 19 '18 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.