473,395 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Email verifacation


Hello every body I had a question

I am involved in a project where I need to verify the user's email
address by sending them an email and asking them to click on a link. now
I have done this but my link is human readable(example
validator.aspx?address="bl**@blah.com") so any user can just type in
their email address into that link and it will validate it for them...
now what I want to do is to encrypt this email but most of the
encryption methods that I have searched into end up giving me a very
long strings but most professional websites that I have seen have done
this but they use a very short encrypted string.. can somebody give me
some hints on how to go about this...what is the best most professional
method to use?

btw i am coding this in asp.net 2.0 C#
thank you in advance

Awaiting your responds
---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
12 1394
When thinking about encryption always as yourself if you need to transmit
this info...

IMO those sites are not encrypting at all. They just create a unique
impossible to guess ID and this id is included in the mail... Server side
they know the address that is tagged with this unique id is valid...

Patrice

--

"Amir Ghezelbash" <am*****@rogers.com> a écrit dans le message de
news:OV**************@tk2msftngp13.phx.gbl...

Hello every body I had a question

I am involved in a project where I need to verify the user's email
address by sending them an email and asking them to click on a link. now
I have done this but my link is human readable(example
validator.aspx?address="bl**@blah.com") so any user can just type in
their email address into that link and it will validate it for them...
now what I want to do is to encrypt this email but most of the
encryption methods that I have searched into end up giving me a very
long strings but most professional websites that I have seen have done
this but they use a very short encrypted string.. can somebody give me
some hints on how to go about this...what is the best most professional
method to use?

btw i am coding this in asp.net 2.0 C#
thank you in advance

Awaiting your responds
---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2

you mean a GUID ...if i do that ..then how would i know which email is
it that they are trying to validate ?

their account could have more then one email address!

i have to somehow include the email address inot the link

---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3
When the user submits their email address, and you store that address in a
table (perhaps CustomerEmail), also store the GUID in a column. Therefore,
you have a link between the GUID and a specific email address. Just be sure
to use a randomly generated id like a guid instead of sequentially generated
id, becuase it is more difficult to hack.

"Amir Ghezelbash" <am*****@rogers.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...

you mean a GUID ...if i do that ..then how would i know which email is
it that they are trying to validate ?

their account could have more then one email address!

i have to somehow include the email address inot the link

---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #4

"bradley" <so*****@microsoft.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
When the user submits their email address, and you store that address in a
table (perhaps CustomerEmail), also store the GUID in a column. Therefore,
you have a link between the GUID and a specific email address. Just be
sure
to use a randomly generated id like a guid instead of sequentially
generated
id, becuase it is more difficult to hack.

"Amir Ghezelbash" <am*****@rogers.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...

you mean a GUID ...if i do that ..then how would i know which email is
it that they are trying to validate ?

their account could have more then one email address!

i have to somehow include the email address inot the link

---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***



As a sidenote, if you want small values instead of the long value GUID's
represent, you may want to look into Identity columns (incremented numeric
values).

Mythran

Nov 19 '05 #5
Yes such as a GUID but it doesn't have (and shouldn't be IMO) the profile
GUID (to avoid giving away an information that could be used some later day
maliciously).

I was thinking rather to something like a "job id".

The whole process would be :
- the user registers a new mail address (I suppose it goes in a child table
of its profile with its own unique id)
- register in the job table a new job with its unique id and the id of the
mail address to validate
- send the validation link

When the user clicks the link :
- retrieve the id of the mail to validate from the job table
- update the address record to mark the address as validated
- delete the record from the job table

If the user is allowed to change its mail, you may want also to do the same
process so that the updated address is validated (though it could be still
the same record id in the db).

Something along these lines...

Patrice

--

"Amir Ghezelbash" <am*****@rogers.com> a écrit dans le message de
news:ua**************@tk2msftngp13.phx.gbl...

you mean a GUID ...if i do that ..then how would i know which email is
it that they are trying to validate ?

their account could have more then one email address!

i have to somehow include the email address inot the link

---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #6
You are right that an identity column could be stored as a much smaller
integer value. However, the problem with identity values is that they are
sequntially generated and it would be easy for the user to alter the url to
point to another record.

For example, let's assume the following URL were emailed back to the user:
validator.aspx?confirmation=457

They could edit the ID like so before submitting the link, thus validating
another unrelated user or perhaps even gaining entry to another account.
validator.aspx?confirmation=455

"Mythran" <ki********@hotmail.comREMOVETRAIL> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

"bradley" <so*****@microsoft.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
When the user submits their email address, and you store that address in a table (perhaps CustomerEmail), also store the GUID in a column. Therefore, you have a link between the GUID and a specific email address. Just be
sure
to use a randomly generated id like a guid instead of sequentially
generated
id, becuase it is more difficult to hack.

"Amir Ghezelbash" <am*****@rogers.com> wrote in message
news:ua**************@tk2msftngp13.phx.gbl...

you mean a GUID ...if i do that ..then how would i know which email is
it that they are trying to validate ?

their account could have more then one email address!

i have to somehow include the email address inot the link

---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***



As a sidenote, if you want small values instead of the long value GUID's
represent, you may want to look into Identity columns (incremented numeric
values).

Mythran

Nov 19 '05 #7
thanks alot guys...
i have decided to go with tripleDES encryption method to encrypt the
query string and save the key in the registry so only admin can have
access to it ?

any comments?
---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #8
Just out of curiosity, reply back with some examples of your encrypted
query strings.

"Amir Ghezelbash" <am*****@rogers.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
thanks alot guys...
i have decided to go with tripleDES encryption method to encrypt the
query string and save the key in the registry so only admin can have
access to it ?

any comments?
---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #9

here whats my link looks like

validator.aspx?Confirmation=
+Iwq+rx0pQJeRHrGz+dnNf2T+iiG1G4/1Bv1DDwxpbk=
---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #10
Seems like you're going to want to be careful of having special
characters in that string. =, /, etc...they could confuse the URL
parser in the web server.

When I did the same thing, I used a GUID and stripped the dashes out to
be safe.

Nov 19 '05 #11

"Phillip Ian" <ph****@comcast.net> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Seems like you're going to want to be careful of having special
characters in that string. =, /, etc...they could confuse the URL
parser in the web server.

When I did the same thing, I used a GUID and stripped the dashes out to
be safe.


Aye, you should use the URLEncode method to encode special characters :)

HTH,
Mythran

Nov 19 '05 #12
The concern with querystrings it that the server can modify them from
underneath you since certain characters have special interpretations within
a URL. This can cause problems for algorithms like Base64-encoding

Here's some brief pseudo-code to save grief:

// encoding the string
string blah = "TEST";
Crypter crypt = new Crypter(); // not a real object -- implementation of
this is left to you
string encryptedBlah = Server.UrlEncode(crypt.Encrypt(string));

// decoding the string
Crypter crypt = new Crypter();
string decryptedBlah =
crypt.Decrypt(Server.UrlDecode(Request.QueryString["blah"]).Replace("
","+"));
"Phillip Ian" <ph****@comcast.net> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Seems like you're going to want to be careful of having special
characters in that string. =, /, etc...they could confuse the URL
parser in the web server.

When I did the same thing, I used a GUID and stripped the dashes out to
be safe.

Nov 19 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
4
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
2
by: BSG-SMTP-Gateway | last post by:
The following message sent by this account has violated system policy: Connection From: 64.253.55.90 From: python-list@python.org To: terriss@birdsall.com, q4dzsAEAAAAA@birdsall.com,...
26
by: libsfan01 | last post by:
Hi all! Can anyone show me how to check and email field on a form for the existence of these two characters. Kind regards Marc
3
by: g0c | last post by:
hi, how to hide or replace email addresses in php mail function with something like "group" so the email addresses to which email is sent are not visible ? i have : $subs = "email1@dot.com,...
3
by: Erik Johnson | last post by:
THE GOAL: I need to send an email with a simple ASCII text body and an attached HTML file. I have scripts that send basic emails via the smtplib module that don't have any attachements and that...
15
by: Craig Hurley | last post by:
Hello, user@x.com receives an email from user@a.com. I want to forward that email to user@y.com. I want the contents/header to remain intact, with the exception of adding "X-Forwarded-For". ...
3
by: IGD | last post by:
I don't know if this is the right place to post this or not. If not, could someone direct me elsewhere where I would find more information on how to solve my problem? Thanks! My problem is this:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.