LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-31-2003, 04:25 PM   #16
jacksmash
Member
 
Registered: Nov 2003
Location: Ontario, Canada
Distribution: Ubuntu
Posts: 269

Original Poster
Rep: Reputation: 30

One weakness I have discovered about this is that it does record a session ID in the URL, which if someone were to copy and paste, it would allow them to access the site.

I'm not worried about it for my purposes, but there must be a more secure way!
 
Old 12-31-2003, 04:37 PM   #17
Khabi
Member
 
Registered: Aug 2003
Location: Arizona
Distribution: Gentoo
Posts: 142

Rep: Reputation: 15
I'm pretty sure there is a way to turn that off actually, because on the pages I've done with it the session ID doesn't show up. I'll look it up for ya tho.
You're welcome by the way. Have a good one. If you ever need anything else feel free to look me up.

**EDIT**
Seems like it only adds the session to the url if you have cookies disabled.

Last edited by Khabi; 12-31-2003 at 04:40 PM.
 
Old 12-31-2003, 07:44 PM   #18
jacksmash
Member
 
Registered: Nov 2003
Location: Ontario, Canada
Distribution: Ubuntu
Posts: 269

Original Poster
Rep: Reputation: 30
Actually cookies are enabled on my PC - however, I will look it up as well on PHP.net
 
Old 01-04-2004, 05:10 PM   #19
coolman0stress
Member
 
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
You could also try and use cookies by themselves, instead of through sessions.

Create the cookie when the user registers, then read the cookie whenever you need the hidden info.
 
Old 01-04-2004, 05:20 PM   #20
jacksmash
Member
 
Registered: Nov 2003
Location: Ontario, Canada
Distribution: Ubuntu
Posts: 269

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by coolman0stress
You could also try and use cookies by themselves, instead of through sessions.

Create the cookie when the user registers, then read the cookie whenever you need the hidden info.
I see what you're saying... but what if a user decided to delete his cookies? Then wouldn't he need to reregister??
 
Old 01-04-2004, 07:16 PM   #21
coolman0stress
Member
 
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
That's correct. At the same time you would encounter a similar problem with using sessions, since it tends to employe cookies as well. You don't directly "see" it, but most configurations do.

On the other hand, this won't be much of a problem for the type of application you are trying to develop. The idea is that a user logs and then his/hers info is carried between the pages he/she visits. If they leave the site and return later, with cookies, you could make it so the person's info is remembered. Or you can make it expire like with a session. If they delete their cookies, then it doesn't matter, since you'd just make them login again, just like what would need to happen with sessions.

In the end it doesn't matter much...
 
Old 01-04-2004, 08:31 PM   #22
jacksmash
Member
 
Registered: Nov 2003
Location: Ontario, Canada
Distribution: Ubuntu
Posts: 269

Original Poster
Rep: Reputation: 30
right... for my current project what I have is sufficient...but I still would like to know what the best thing to do is for when I launch a site that needs to be totally secure!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
simple apache - php question davespink Linux - Newbie 4 12-28-2005 04:47 PM
Simple PHP Question newuser455 Programming 9 08-28-2005 11:58 PM
simple php question jfall Programming 1 05-03-2005 02:57 PM
Simple PHP question jacksmash Programming 15 03-01-2004 07:00 PM
simple question...where is php.ini taran Linux - Software 3 08-25-2003 01:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration