Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Validating email in CF

Guest
Mar 18, 2008 Mar 18, 2008
Hi,

I am creating an application that needs an email verification when user creates an account into the app, I need to send the link with the user_id as attached parameter so when they click on the link they will be validated into the database. The problem is that the link is sending like this
http://www.app.com?user_id=12
Is that correct? I've seen that the links like this use some kind of encryption. I don't know how to create it.

TOPICS
Getting started
532
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Mar 19, 2008 Mar 19, 2008
Thank you, I did that and worked perfect-
Translate
Engaged ,
Mar 18, 2008 Mar 18, 2008
If the user is malicious, they could issue a bunch of url's.

http://www.app.com?user_id=12
http://www.app.com?user_id=13
http://www.app.com?user_id=14
http://www.app.com?user_id=15
http://www.app.com?user_id=16
etc...

What you could do is store a UUID in a column in your database then use that as part of the url for authenticatiion.

If you're trying to prevent spammers from authorizing a bunch of emails, you'll need to step up the process a bit and include something like a CAPTCHA.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 18, 2008 Mar 18, 2008
I was going to post what c_wigginton said. Do that. 🙂
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 19, 2008 Mar 19, 2008
Thank you, I did that and worked perfect-
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 20, 2008 Mar 20, 2008
LATEST
Using GetTickCount() would be also an alternative instead of generating UUIDs. :)

<cfset authID = GetTickCount() />
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources