Re: question about more secure authentication
- From: NN <NoName@xxxxxxxx>
- Date: Thu, 27 Mar 2008 09:08:22 -0500
On Wed, 26 Mar 2008 23:29:52 -0500, Jerry Stuckle
<jstucklex@xxxxxxxxxxxxx> wrote:
NN wrote:
I have an authentication scheme that uses the usual mysql/php.
when the username and password match the entries in the database, the
user is redirected to a user only page, otherwise, he goes back to the
login page.
on the protected pages i use SESSIONS to check if the
$_SESSION['userid'] is set and in case of failure it goes back to the
login page.
now, i've been reading about SESSION hijacking, etc and i'd like to
make this login much more secure. i'm thinking about storing the
username in a SESSION and check on every protected page whether the
userid and username match the entries in the database table.
is this a good idea or just a waste of resources?
any ideas of how to make this more secure?
thank you very much, your input is very much appreciatted.
NN
You can do it, but the chances of someone hijacking a session are very
small. They would have to be in the path between your client and your
server.
The chances of this are small, and unless you have something like
financial information, even smaller. Nonetheless, if you want to be
more secure, use https: protocol. That will encrypt the transmissions
and all but assure the session cannot be hijacked.
thank you Jerry for your response.
so what i should do is to place the login page inside del https so the
POST variables are encypted also.
now, i'm curious. in case of using http, would it be easy for a hacker
to set a SESSION['userid']= 1 and read all the information that
belongs to that user?
also, i'm trying to protect some PDF. i'm using this code.
<?php
require_once("includes/protectpage.inc.php"); ?>
protect();
header('Content-type: application/pdf');
readfile('invoice.pdf');
?>
where invoice.pdf is a path outside the web server.
is this also secure as far as authentication goes if i put it within a
https or because of reading a file that is outside de https it will be
unencryted data?
thanks again for all your help,
NN
.
- Follow-Ups:
- Re: question about more secure authentication
- From: Jerry Stuckle
- Re: question about more secure authentication
- References:
- question about more secure authentication
- From: NN
- Re: question about more secure authentication
- From: Jerry Stuckle
- question about more secure authentication
- Prev by Date: Re: question about more secure authentication
- Next by Date: Re: question about more secure authentication
- Previous by thread: Re: question about more secure authentication
- Next by thread: Re: question about more secure authentication
- Index(es):
Relevant Pages
|