From: Chris <csmith@squiz.net>
To: pgsql-php@postgresql.org
Subject: RE: Re: Re: Secure pages
Date: Wed, 14 Mar 2001 09:32:06 +1100
Message-ID: <4.3.2.7.2.20010314092748.00b43b60@203.25.173.1> (raw)
In-Reply-To: <NEBBJIFEELNNHFCELNFJMEPOCAAA.cm@chello.at>
References: <OF3CE0DA25.509B61DE-ON85256A0E.0071EAA3@hartehanks.com>
>Why not ask for a password, encrypt it (with 128bit or something;), check it
>with the database (which has the encyrpted pwds) and pass the encrypted
>password from page to page...
>
>like: <a href="blah.php?encryptedpassword">
>or just a variable which is one indicating that the password was typed in
>correctly at least once!
>
>For the mater of direct accessing you could just check if the pwd (or the
>var) was passed (is one) and if not -> well no access...
>
>You could also use a cookie and check for it (with the encrypted pwd) but (I
>don't know why) cookies seem preaty unsafe too me :o)
>
>just my two cents;)
This is the same sort of idea as sessions... but with sessions nobody sees
their encrypted password (not that they can read it, its better for people
not to see the info at all if possible.. and better for search engines).
As someone else suggested, have a check on each page for a session variable
(which of course is set when they login).
<?
if (!isset($sessionvariable) {
header("Location:login.php");
exit;
}
?>
This can be in an include file, as a function (just remember to globalise
variables! I always forget :P), that way it will get checked on all your
protected pages :)
HTH
------------------------
Chris Smith
http://www.squiz.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: csmith@squiz.net
Subject: Re: Secure pages
In-Reply-To: <4.3.2.7.2.20010314092748.00b43b60@203.25.173.1>
References: <OF3CE0DA25.509B61DE-ON85256A0E.0071EAA3@hartehanks.com> <4.3.2.7.2.20010314092748.00b43b60@203.25.173.1>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox