473,563 Members | 2,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

If using Cookies Inline in ASP page is Safe???


Hi,

I am making use of cookies to store the Session State information
through JavaScript as given below in an ASP Page. Suppose I have XYZ.asp
page. The code in this page goes as shown below.
*************** *************** *************** ************
<%
'Remark: ASP Code here
dim staffID
dim TaskCD
set objFile = server.CreateOb ject("PTSUFILE. PTSUFILESRV")
%>
<Script language="JavaS cript">
var environment;
var physicalpath;
var userid;

environment = window.opener.d ocument.FORM.as _environment.va lue;
physicalpath = window.opener.d ocument.FORM.as _physicalpath.v alue;
userid = window.opener.d ocument.PTSFORM .as_userid.valu e;

document.cookie ="Environmen t=" + environment + "";
document.cookie ="PhysicalPath= " + physicalpath + "";
document.cookie ="UserID=" + userid + "";

</Script>
<%
'Remark:ASP Code Continues Here
'Remark:Get the physical path from cookies and set cookievalue to blank.

Dim physicalpath
physicalpath = Request.Cookies ("physicalpath" )
Session("StrPhy sicalPath") = Cstr(physicalpa th)
Response.Cookie s("physicalpath ")= ""

*************** *************** *************** ************

Here I am trying to get the Session data from an previous page into a
new opened window ASP page throuh javascript.

And I am doing it so becos, I am sharing my session data across asp and
aspx pages in the same application. So i have a custom session object
which I fetch and store in oracle 9i database each time a request is
made to webserver.

I just want to know if I set the Response.Buffer Property on the top of
asp page to true. And use the above inline JavaScript code to store data
like Path, UserId in cookies. Again then fetch this data immediately in
the next line in ASP code from cookies and then set the cookies to
nothing. Is this way of using Cookies to store the session data is safe.
As I am immediately destrying the cookie data once I get it in my asp
page for use.

Please reply ASAP...
Thanks in Advance !
Regards,
Amit
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
0 1509

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

Similar topics

3
3226
by: Shawn Wilson | last post by:
Hi, I've created a PHP file called filename.jpg. It outputs a JPG. I've set up a .htaccess file to force the filetype to PHP. The file is displayed in a page on a browser. I cannot get the damn thing to save as my suggested filename or even as anything but a BMP in IE6. I've tried a bunch of different combinations of the content-type...
0
11526
by: Antwerp | last post by:
Hi, I'm trying to create a perl script that will log into a website (the login form uses POST), navigate to several pages, and append the (html) content parsed from those pages to a seperate log file. I'm not very familiar with this aspect of perl, and have been having some trouble in the POSTing of the form data, while using cookies to log...
9
2525
by: | last post by:
Is it possible for a user to enable permanent cookies but disable session cookies.....this seems like a contradition yet this is what I appear to be reading in online articles?
6
3028
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a cookie (say Response.Cookies ("TEST")) and you have a query string variable &test=x or &Test=x and you get Request.QueryString to parse the query...
1
1840
by: Bhupesh Saini | last post by:
I am trying to call a ASPX page using HttpWebRequest class and pass cookie information to it. My ASPX pages gets called just fine, however none of the request cookies are available to the ASPX page. What do I need to do to have the cookies sent along with the request Below is the code snippet from the function I an using I am using to achieve...
5
1397
by: Ryan Ternier | last post by:
Hey! We need a solution for a problem. We're designing a site where users hate... absolutly hate... with a passion to sign in with a user name / password system. They want to sign in once, and that's it. User's are all behind an internal IP so we can't use the old method of remembering IP's as that would mess up user preferences. We...
2
8775
by: barrybevel | last post by:
Hi, I have a very small simple program below which does the following: 1) post a username & password to a website - THIS WORKS 2) follow a link - THIS WORKS 3) update values of 2 fields and post the form - ERROR! This works fine using firefox even with javascript turned off. But when using Perl (v5.8.8 on FC5) I get a page back stating...
1
3940
by: comeshopcheap | last post by:
Hi I am using this script to access doba.com (I need to download some files) but I keep on being sent back to the login page not the user home page. Any help. I think I may need to use a post method and opener is using a get method Thanks import mechanize
3
3146
by: Inny | last post by:
I want To offer a login Option, two Checkboxs, 1 labeled 'normal' the other labeled 'Forever'. I want to assign the check boxes to switch between the cookie script below (normal) and An altered version of the cookie script 'forever' Which will not expire but require deletion from the users pc. I need help to alter the cookie code below NOT to...
0
7664
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7948
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.