473,396 Members | 2,158 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,396 software developers and data experts.

Hide or encode URL

I want to send emails that would include a link to an asp page. The link
would look like

http://10.0.0.10/ContactDetails.asp?ID=18484

How can I prevent someone from simply typing in a different number in the
URL that would load a different page. I'd prefer not to have to use a
password. Code samples would be most helpful.

thanks
Jul 19 '05 #1
7 9021
Server.URLEncode(The_URL_to_encode)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Terri <Te***@spamaway.com> wrote in message
news:c2**********@reader2.nmix.net...
I want to send emails that would include a link to an asp page. The link
would look like

http://10.0.0.10/ContactDetails.asp?ID=18484

How can I prevent someone from simply typing in a different number in the
URL that would load a different page. I'd prefer not to have to use a
password. Code samples would be most helpful.

thanks

Jul 19 '05 #2
> http://10.0.0.10/ContactDetails.asp?ID=18484

How can I prevent someone from simply typing in a different number in the
URL that would load a different page. I'd prefer not to have to use a
password. Code samples would be most helpful.


By different number, I assume you mean the ID in the querystring. And, I'm
assuming once someone follows that link, they're redirected to another page?
If so, the only way I can think of to validate if it's the correct url is to
include some other identifier in the url also, and then match them up on the
destination page.

For example,

The url: http://10.0.0.10/ContactDetails.asp?ID=18484&PID=2

On ContactDetails.asp:

id = request.querystring("id")
page_id = request.querystring("pid")

response.redirect("SomeOtherPage.asp?pid=" & page_id)

On SomeOtherPage.asp:

page_id = 1

if cint(request.querysting("pid") <> page_id then
response.redirect ("default.asp")
end if
Or, something like that.

Randy

Jul 19 '05 #3
"Terri" <Te***@spamaway.com> wrote in message
news:c2**********@reader2.nmix.net...
I want to send emails that would include a link to an asp page. The link
would look like

http://10.0.0.10/ContactDetails.asp?ID=18484

How can I prevent someone from simply typing in a different number in the
URL that would load a different page. I'd prefer not to have to use a
password. Code samples would be most helpful.


Ideally, you should be encrypting the IDs that you pass around so the user
couldn't do something like that. Users should never see an unencrypted ID
value because it's a security risk. In other words, your ASP application
would get the ID from the database and encrypt it, then pass around the
encrypted value, and then decrypt it when it needed to make a call back to
the server with that value.

Regards,
Peter Foti
Jul 19 '05 #4
"Terri" wrote:

http://10.0.0.10/ContactDetails.asp?ID=18484

How can I prevent someone from simply typing in a different number
in the URL that would load a different page.


The other responses all seem to think you were asking how to hide the true
destination of the document, but I read it to mean you didn't want users to
be able to guess article IDs. Is that correct?

If so, then you probably should use IDs that are not sequential, and
furthermore seem random. One simple approach would be to use GUIDs. Your
URLs would end up looking something like this:

http://server/ContactDetails.asp?ID=...6-FECBB568B277

....which would map to article 18484 in the DB.

See this for pros and cons:
http://www.devx.com/dbzone/Article/10167

If GUIDs seem too large (they are 16 bytes), you can always generate random
numbers and check for uniqueness when creating your article IDs.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #5
Thanks for all your responses.

The ID refers to a contact so I don't want one contact to be able to type
in someone else's contact ID and modify someone else's data.

The encryption suggestion seems to be the most secure. I assume if I used
the URLEncode method that the encoded string could be reverse-engineered.
The guid method may also be secure enough for my needs.

I needed general ideas about how to accomplish this in order to prepare a
price estimate, so I think I have enough info for that. If I get the project
I'll have to examine one of these methods in more detail.

Thanks again.

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:On**************@TK2MSFTNGP11.phx.gbl...
"Terri" wrote:

http://10.0.0.10/ContactDetails.asp?ID=18484

How can I prevent someone from simply typing in a different number
in the URL that would load a different page.
The other responses all seem to think you were asking how to hide the true
destination of the document, but I read it to mean you didn't want users

to be able to guess article IDs. Is that correct?

If so, then you probably should use IDs that are not sequential, and
furthermore seem random. One simple approach would be to use GUIDs. Your
URLs would end up looking something like this:

http://server/ContactDetails.asp?ID=...6-FECBB568B277
...which would map to article 18484 in the DB.

See this for pros and cons:
http://www.devx.com/dbzone/Article/10167

If GUIDs seem too large (they are 16 bytes), you can always generate random numbers and check for uniqueness when creating your article IDs.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 19 '05 #6
Encode and Encrypt are different...
You want Encrypt

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Terri" <Te***@spamaway.com> wrote in message
news:c2**********@reader2.nmix.net...
Thanks for all your responses.

The ID refers to a contact so I don't want one contact to be able to type
in someone else's contact ID and modify someone else's data.

The encryption suggestion seems to be the most secure. I assume if I used
the URLEncode method that the encoded string could be reverse-engineered.
The guid method may also be secure enough for my needs.

I needed general ideas about how to accomplish this in order to prepare a
price estimate, so I think I have enough info for that. If I get the project I'll have to examine one of these methods in more detail.

Thanks again.

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:On**************@TK2MSFTNGP11.phx.gbl...
"Terri" wrote:

http://10.0.0.10/ContactDetails.asp?ID=18484

How can I prevent someone from simply typing in a different number
in the URL that would load a different page.


The other responses all seem to think you were asking how to hide the true destination of the document, but I read it to mean you didn't want users

to
be able to guess article IDs. Is that correct?

If so, then you probably should use IDs that are not sequential, and
furthermore seem random. One simple approach would be to use GUIDs. Your
URLs would end up looking something like this:

http://server/ContactDetails.asp?ID=...6-FECBB568B277

...which would map to article 18484 in the DB.

See this for pros and cons:
http://www.devx.com/dbzone/Article/10167

If GUIDs seem too large (they are 16 bytes), you can always generate

random
numbers and check for uniqueness when creating your article IDs.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.

Use
of this email address implies consent to these terms. Please do not

contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.


Jul 19 '05 #7
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:Og**************@tk2msftngp13.phx.gbl...
Encode and Encrypt are different...
You want Encrypt


Yeah, what he said. :)
Try reading this article. I think he includes some references to some ways
to encrypt the data (but you could also use something like ASPEncrypt if
your host provides it).
http://authors.aspalliance.com/nothi...l=nothingmn_10

Best,
Peter Foti
Jul 19 '05 #8

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

Similar topics

1
by: Nick Ashton | last post by:
Hi Whilst browsing the MSDN on day, I am sure I saw an article on 'How to encode your ASP code within the asp page', but I can not find it again. Can anyone help me please. If I remember the...
3
by: maflu | last post by:
Hello, I have a form on my website to send data to my email address with the usual line: <input type=hidden name="recipient" value="myname@myaddress.com"> What is the best way do you think to...
1
by: ok | last post by:
I think my last question was not clear, so people gave me the reverse answer. I want to put a string in an html file, and human eyes or robots will not be able to read it. For example I want...
8
by: Alex Nitulescu | last post by:
Hi. I have the following question - is it possible (I assume it is, but I have no idea how to do it) to HIDE the href text which automatically shows in the status bar of IE ? I have build a...
2
by: bhavik | last post by:
hi i want to know how to hide the values in query string in ASP.net. here i want to send the values from one page to another page through query string with out explicitly visible the values in...
4
by: Laurahn | last post by:
How can i hide the real URL (i mean the Physical Application Path) of a web page on the IE? I don't know if it is related to "HtmlEncode"? Can someone give an example? Thanks. !!
1
by: pawan123 | last post by:
Hi, I am using VB6 and SQL Server 2000. I want to design a logon form. In this form, how can I use a Password field to store in encrypted form in tbluser table and how can I compare password...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
4
by: rkyakkala | last post by:
Hi, In my webapplication i am opening new window by passing some parameters.i am passing password also as parameter.But i need to hide it or encode it. how can i do this.Following is my code: ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.