General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 29th, 2002, 11:11 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
saving login details

Ive just created a members area for my web site case-extreme.com but i was just wanting your opion on saving the details in cookies, so the visitor doesnt have to sign in on ever visit???

I was thinking about saving the username and password, each in a seperate cookie, (encypted with md5 or something) then checking to see if the cookie was set. and check the details agains the database.


does this sound ok?? can you think of any security flaws that my happen?? as i want to make my site as user friendly as possible without comprimising on its security.

Reply With Quote
  #2  
Old October 29th, 2002, 11:18 PM
James Yang James Yang is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Atlanta, Georgia
Posts: 284 James Yang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 45 sec
Reputation Power: 7
Send a message via ICQ to James Yang
well..

as long as they are encrypted...

MD5 is one way encryption tho...
__________________
Regards,

James Yang
.NET Developer / Network Engineer
MCSE, MCDBA, MCSA, CCNA

http://www.yellowpin.com/
http://www.opentechsupport.com/

Reply With Quote
  #3  
Old October 29th, 2002, 11:23 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
ill probally do a combo of md5 and base64 + my own basic encrypt method, so it will be like a 1 in 1,000,000,000,000,000,000,000 of hacking it.

Reply With Quote
  #4  
Old October 29th, 2002, 11:25 PM
James Yang James Yang is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Atlanta, Georgia
Posts: 284 James Yang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 45 sec
Reputation Power: 7
Send a message via ICQ to James Yang
the prob is ben,

you can't use the stored password to log them in..cuz its encrypted..and to compare it with the pass..u ned to decrypt it..but its one way..so u can't decrypt it..

Reply With Quote
  #5  
Old October 29th, 2002, 11:32 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
quick reply eheheh


anyway your kinda got the point

i dont need to dycrypt it tho

what i can do, is apply the same encrypt method to the database password and compaired the two together

basically you have something like this


$cookievariable = md5(md5(md5(md5(md5($cookievariable)))));

$databasevariable = md5(md5(md5(md5(md5($databasevariable)))));

if($cookievariable == $databasevariable)
//is true, create login details
else
login fail

you get what i mean by this?

Reply With Quote
  #6  
Old October 29th, 2002, 11:34 PM
James Yang James Yang is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Atlanta, Georgia
Posts: 284 James Yang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 45 sec
Reputation Power: 7
Send a message via ICQ to James Yang
wha'ts the difference between storing the password with no encryption and with encryption ?

Reply With Quote
  #7  
Old October 29th, 2002, 11:36 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
you mean as a cookie or in the database?

Reply With Quote
  #8  
Old October 29th, 2002, 11:36 PM
James Yang James Yang is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Atlanta, Georgia
Posts: 284 James Yang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 45 sec
Reputation Power: 7
Send a message via ICQ to James Yang
in the cookie

Reply With Quote
  #9  
Old October 29th, 2002, 11:37 PM
James Yang James Yang is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Atlanta, Georgia
Posts: 284 James Yang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 45 sec
Reputation Power: 7
Send a message via ICQ to James Yang
how about

storing the session id ? then chk if the session is alive ...or dead..and make them re authenticate when they are dead

Reply With Quote
  #10  
Old October 31st, 2002, 11:36 PM
wAr-AnGeL wAr-AnGeL is offline
Forum Security
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Behind You
Posts: 479 wAr-AnGeL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m
Reputation Power: 7
Send a message via ICQ to wAr-AnGeL Send a message via AIM to wAr-AnGeL
i use cookies to save user's status on Got Lag no one has reported to have been hacked and no one has hacked our admin area.
__________________




"Only Linux users see the end of crashes."
- Pl4t0

Reply With Quote
  #11  
Old October 31st, 2002, 11:37 PM
wAr-AnGeL wAr-AnGeL is offline
Forum Security
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Behind You
Posts: 479 wAr-AnGeL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m
Reputation Power: 7
Send a message via ICQ to wAr-AnGeL Send a message via AIM to wAr-AnGeL
also, i do what James said, the cookie stores their session id and checks if their session id has been logged in, if not make them relog in.

Reply With Quote
  #12  
Old November 1st, 2002, 12:43 AM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
war angel any sample code would be helpful too

Reply With Quote
  #13  
Old November 1st, 2002, 07:25 AM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
if you can wait im going to be writing a article on creating a members area with session and a database

Reply With Quote
  #14  
Old November 1st, 2002, 09:59 AM
crazytrain81 crazytrain81 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 232 crazytrain81 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Ben, that sounds fine. That's really the best you can do... and storing them in seperate cookies is also a good idea. I used an encryption method on a site that used 2 cookies for the password and 1 of course for the username. it was something like... md5(password)*md5(password)+md5(password) = cookie1 and md5(password)/md5(password)+md5(password = cookie2 , and cookie1 + cookie2 = what was in the db, hehe.

Reply With Quote
  #15  
Old November 1st, 2002, 10:20 AM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Quote:
Originally posted by Ben Rowe
if you can wait im going to be writing a article on creating a members area with session and a database


can wait ! .. Thanks
__________________
Hungry for Code

Programming works best with a team over one single person

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > saving login details


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |