Printer-friendly copy Email this topic to a friend
Lobby High-Tech topic #162126

Subject: "Is this a secure method?" Previous topic | Next topic
alexthezombie
Member since Jan 18th 2004
2950 posts
Wed Aug-27-08 02:18 PM

Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
4. "Is this a secure method?"
In response to In response to 0


  

          

Heh, I was doing more digging around and I'm using this for my encryption

md5(sha1($password));

Good luck cracking that shit LOL. While looking around, I found that people were even going all kinds of crazy by having it re-encrypt itself like 100 times over. Kind of extreme.

But as for making the user data available to the pages & scripts, I'm not seeing any other way then to define each of the needed variables as a SESSION variable.

One way I'm thinking of doing it is like this:
On login success, the data entry updates itself with a fresh session ID code and then all that would be stored in SESSION is that ID. And then on every page (in the header) having the information loaded in to an array by polling the database for an entry with the matching SESSION ID.

My only gripe with that method is it seems like I have to do a database query on every page, which may be fine for now, but I'm thinking scalability. When I have like 1000s of pages being loaded a second by different people, is it gonna hurt my database to be running a query at the top of every page like that?

It seems like it'd be easier to just load up the basic info (user name, shopping cart contents, and avatar url)

Thoughts? I really appreciate everyone's input and help.

  

Printer-friendly copy | Reply | Reply with quote


School Me on Secure Login (PHP, of course) [View all] , alexthezombie, Wed Aug-27-08 06:35 AM
 
Subject Author Message Date ID
RE: School Me on Secure Login (PHP, of course)
Aug 27th 2008
1
I think generally you assign the user a session ID when they login
Aug 27th 2008
2
fam you need to just buy a good book on php...
Aug 27th 2008
3
Maybe
Aug 27th 2008
9
      I understand...
Aug 27th 2008
10
see #3
Aug 27th 2008
5
make a database call once. then load the result into the...
Aug 27th 2008
6
oh, and md5(sha1($pass)) is less secure than something like...
Aug 27th 2008
7
      ooooo, I like that
Aug 27th 2008
8
HELP!
Sep 08th 2008
11
call session_start(). And buy a book on php.
Sep 08th 2008
12
      I'm not THAT stupid
Sep 08th 2008
13

Lobby High-Tech topic #162126 Previous topic | Next topic
Powered by DCForum+ Version 1.25
Copyright © DCScripts.com