pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedSecure pages
22+ messages / 13 participants
[nested] [flat]
* Secure pages
@ 2001-03-13 17:20 Paul Joseph McGee <mcgee@student.cs.ucc.ie>
2001-03-13 22:23 ` Re: Secure pages Grant <grant@conprojan.com.au>
0 siblings, 1 reply; 22+ messages in thread
From: Paul Joseph McGee @ 2001-03-13 17:20 UTC (permalink / raw)
To: pgsql-php
Hi everybody,
i have a user login authentication sysytem on my machine here where users
may view pages but to do other things the user must login. the login
scripts seem to work ok and are based on a "Secure Authentication System"
from www.phpbuilder.com. Basically the page where i want people to arrive
at upon logging in is at present viewable by anyone who puts the proper
url into their browser. how do i keep this and other pages secure from
people who havent logged in?
Thanks,
Paul
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Secure pages
2001-03-13 17:20 Secure pages Paul Joseph McGee <mcgee@student.cs.ucc.ie>
@ 2001-03-13 22:23 ` Grant <grant@conprojan.com.au>
0 siblings, 0 replies; 22+ messages in thread
From: Grant @ 2001-03-13 22:23 UTC (permalink / raw)
To: Paul Joseph McGee <mcgee@student.cs.ucc.ie>; +Cc: pgsql-php
> Hi everybody,
> i have a user login authentication sysytem on my machine here where users
> may view pages but to do other things the user must login. the login
> scripts seem to work ok and are based on a "Secure Authentication System"
> from www.phpbuilder.com. Basically the page where i want people to arrive
> at upon logging in is at present viewable by anyone who puts the proper
> url into their browser. how do i keep this and other pages secure from
> people who havent logged in?
> Thanks,
> Paul
Create a session. If (!(isset($session))) then redirect to login.php or your authentication file.
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Secure pages
@ 2001-03-13 18:07 Timothy_Maguire@hartehanks.com
2001-03-13 18:45 ` Re: Re: Secure pages Dan Wilson <phpPgAdmin@acucore.com>
2001-03-13 19:18 ` Re: Re: Secure pages Michael Fork <mfork@toledolink.com>
0 siblings, 2 replies; 22+ messages in thread
From: Timothy_Maguire@hartehanks.com @ 2001-03-13 18:07 UTC (permalink / raw)
To: Paul Joseph McGee <mcgee@student.cs.ucc.ie>; +Cc: pgsql-php
if you are using apache web server you can try the .htaccess method. I am
not too familar with it. I am trying to learn it myself, but from what i
gather, you put a file called .htaccess in the dir where your web page is.
the .htaccess file contains a path to the a file where all the user names
and passwords are stored. whenever this dir is accessed, a window pops up
asking for a user id and password.
If anyone has more info on this, please pass it on. I am looking into
using this as well. What i am looking to do is create a web based ftp
application. Where users log into a web screen and can ftp files to the
server into a certain directory own by them. I am storing the file paths
and descriptions in a postgresql db and using php for the ftp process. Can
I use .htaccess with this? Can I have someone log into the web page using
.htaccess and passing their user id and password into a cookie or variable
so i will know who they are and they don't have to re-type this when they
ftp the file.
Any help would be great.
Thanks,
Tim.
Paul Joseph McGee <mcgee@student.cs.ucc.ie>@postgresql.org on 03/13/2001
12:20:57 PM
Sent by: pgsql-php-owner@postgresql.org
To: pgsql-php@postgresql.org
cc:
Subject: Secure pages
Hi everybody,
i have a user login authentication sysytem on my machine here where users
may view pages but to do other things the user must login. the login
scripts seem to work ok and are based on a "Secure Authentication System"
from www.phpbuilder.com. Basically the page where i want people to arrive
at upon logging in is at present viewable by anyone who puts the proper
url into their browser. how do i keep this and other pages secure from
people who havent logged in?
Thanks,
Paul
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
@ 2001-03-13 18:45 ` Dan Wilson <phpPgAdmin@acucore.com>
2001-11-16 07:41 ` Re: Re: Secure pages speedboy <speedboy@nomicrosoft.org>
1 sibling, 1 reply; 22+ messages in thread
From: Dan Wilson @ 2001-03-13 18:45 UTC (permalink / raw)
To: Paul Joseph McGee <mcgee@student.cs.ucc.ie>; Timothy_Maguire@hartehanks.com; +Cc: pgsql-php
You can do it with a .htaccess file, but why? You've got a very powerful
scripting language to work with...
I do it through a normal html form. Here's how I do it:
1) My login form and logic is all contained within an include file. That way,
I can include it within any page I feel should be password protected and it
automatically does everything.
2) The form action is left blank so that it will simply reload the same page
and take them to the page (and QUERY_STRING [GET] variables) they originally
intended.
3) The form contains a hidden input tag that is the controling variable.
4) I have an if statement within the login.inc.php file that checks to see if
the control variable is set... if it is, I check the login information against
my authentication scheme (usually a database).
5) If the login info is correct, then set cookies indicating that it's good
and let the page load rather than displaying the login box again. If the
login is invalid, display unset your control variable and let the login screen
load again. Of course, you should also display some type of message indicating
that the login failed.
6) Next time they hit the page where the login.inc.php file is included, it
checks the cookies to see if they have already logged in... if so... let them
by without displaying the login screen.
7) Summary of logic:
a) Check to see if "logged in" cookie exists... if so, let them through
b) If cookie doesn't exist, check if control variable (passed from HTML form)
isset
c) If control variable set, check against database, otherwise display login
screen
d) If database check of login info is valid, let them through, otherwise
display login screen
This method is very reusable... because there is no action in the form tag and
all login is within the include file, all you do is include it within any
access controled file and it works seemlessly.
-Dan
: if you are using apache web server you can try the .htaccess method. I am
: not too familar with it. I am trying to learn it myself, but from what i
: gather, you put a file called .htaccess in the dir where your web page is.
: the .htaccess file contains a path to the a file where all the user names
: and passwords are stored. whenever this dir is accessed, a window pops up
: asking for a user id and password.
:
: If anyone has more info on this, please pass it on. I am looking into
: using this as well. What i am looking to do is create a web based ftp
: application. Where users log into a web screen and can ftp files to the
: server into a certain directory own by them. I am storing the file paths
: and descriptions in a postgresql db and using php for the ftp process. Can
: I use .htaccess with this? Can I have someone log into the web page using
: .htaccess and passing their user id and password into a cookie or variable
: so i will know who they are and they don't have to re-type this when they
: ftp the file.
:
: Any help would be great.
: Thanks,
: Tim.
:
:
:
:
: Paul Joseph McGee <mcgee@student.cs.ucc.ie>@postgresql.org on 03/13/2001
: 12:20:57 PM
:
: Sent by: pgsql-php-owner@postgresql.org
:
:
: To: pgsql-php@postgresql.org
: cc:
:
: Subject: Secure pages
:
:
: Hi everybody,
: i have a user login authentication sysytem on my machine here where users
: may view pages but to do other things the user must login. the login
: scripts seem to work ok and are based on a "Secure Authentication System"
: from www.phpbuilder.com. Basically the page where i want people to arrive
: at upon logging in is at present viewable by anyone who puts the proper
: url into their browser. how do i keep this and other pages secure from
: people who havent logged in?
: Thanks,
: Paul
:
: ---------------------------(end of broadcast)---------------------------
: TIP 2: you can get off all lists at once with the unregister command
: (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
:
:
:
:
:
: **********************************************************************
: This email and any files transmitted with it are confidential and
: intended solely for the use of the individual or entity to whom they
: are addressed. If you have received this email in error please notify
: the system manager.
:
: This footnote also confirms that this email message has been swept by
: MIMEsweeper for the presence of computer viruses.
:
: www.mimesweeper.com
: **********************************************************************
:
: ---------------------------(end of broadcast)---------------------------
: TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 18:45 ` Re: Re: Secure pages Dan Wilson <phpPgAdmin@acucore.com>
@ 2001-11-16 07:41 ` speedboy <speedboy@nomicrosoft.org>
2001-11-16 15:47 ` Re: Re: Secure pages Vince Vielhaber <vev@michvhf.com>
0 siblings, 1 reply; 22+ messages in thread
From: speedboy @ 2001-11-16 07:41 UTC (permalink / raw)
To: pgsql-php
On Tue, 13 Mar 2001, Dan Wilson wrote:
Is anyone else getting crap spewed at them from as far back as March on
this list?
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 18:45 ` Re: Re: Secure pages Dan Wilson <phpPgAdmin@acucore.com>
2001-11-16 07:41 ` Re: Re: Secure pages speedboy <speedboy@nomicrosoft.org>
@ 2001-11-16 15:47 ` Vince Vielhaber <vev@michvhf.com>
2001-11-16 18:11 ` Re: Re: Secure pages Marc G. Fournier <scrappy@hub.org>
0 siblings, 1 reply; 22+ messages in thread
From: Vince Vielhaber @ 2001-11-16 15:47 UTC (permalink / raw)
To: speedboy <speedboy@nomicrosoft.org>; +Cc: pgsql-php
On Fri, 16 Nov 2001, speedboy wrote:
> On Tue, 13 Mar 2001, Dan Wilson wrote:
>
> Is anyone else getting crap spewed at them from as far back as March on
> this list?
yep
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 18:45 ` Re: Re: Secure pages Dan Wilson <phpPgAdmin@acucore.com>
2001-11-16 07:41 ` Re: Re: Secure pages speedboy <speedboy@nomicrosoft.org>
2001-11-16 15:47 ` Re: Re: Secure pages Vince Vielhaber <vev@michvhf.com>
@ 2001-11-16 18:11 ` Marc G. Fournier <scrappy@hub.org>
2001-11-16 19:12 ` Re: Re: Secure pages Vince Vielhaber <vev@michvhf.com>
0 siblings, 1 reply; 22+ messages in thread
From: Marc G. Fournier @ 2001-11-16 18:11 UTC (permalink / raw)
To: Vince Vielhaber <vev@michvhf.com>; +Cc: speedboy <speedboy@nomicrosoft.org>; pgsql-php
the offending user has been removed from the list ...
On Fri, 16 Nov 2001, Vince Vielhaber wrote:
> On Fri, 16 Nov 2001, speedboy wrote:
>
> > On Tue, 13 Mar 2001, Dan Wilson wrote:
> >
> > Is anyone else getting crap spewed at them from as far back as March on
> > this list?
>
> yep
>
> Vince.
> --
> ==========================================================================
> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
> 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
> Online Campground Directory http://www.camping-usa.com
> Online Giftshop Superstore http://www.cloudninegifts.com
> ==========================================================================
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 18:45 ` Re: Re: Secure pages Dan Wilson <phpPgAdmin@acucore.com>
2001-11-16 07:41 ` Re: Re: Secure pages speedboy <speedboy@nomicrosoft.org>
2001-11-16 15:47 ` Re: Re: Secure pages Vince Vielhaber <vev@michvhf.com>
2001-11-16 18:11 ` Re: Re: Secure pages Marc G. Fournier <scrappy@hub.org>
@ 2001-11-16 19:12 ` Vince Vielhaber <vev@michvhf.com>
2001-11-16 19:25 ` Re: Re: Secure pages Marc G. Fournier <scrappy@hub.org>
0 siblings, 1 reply; 22+ messages in thread
From: Vince Vielhaber @ 2001-11-16 19:12 UTC (permalink / raw)
To: Marc G. Fournier <scrappy@hub.org>; +Cc: speedboy <speedboy@nomicrosoft.org>; pgsql-php
On Fri, 16 Nov 2001, Marc G. Fournier wrote:
>
> the offending user has been removed from the list ...
I didn't look at the headers, you mean someone actually sent them
and it wasn't a logjam somewhere?
>
>
> On Fri, 16 Nov 2001, Vince Vielhaber wrote:
>
> > On Fri, 16 Nov 2001, speedboy wrote:
> >
> > > On Tue, 13 Mar 2001, Dan Wilson wrote:
> > >
> > > Is anyone else getting crap spewed at them from as far back as March on
> > > this list?
> >
> > yep
> >
> > Vince.
> > --
> > ==========================================================================
> > Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
> > 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
> > Online Campground Directory http://www.camping-usa.com
> > Online Giftshop Superstore http://www.cloudninegifts.com
> > ==========================================================================
> >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> >
>
>
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 18:45 ` Re: Re: Secure pages Dan Wilson <phpPgAdmin@acucore.com>
2001-11-16 07:41 ` Re: Re: Secure pages speedboy <speedboy@nomicrosoft.org>
2001-11-16 15:47 ` Re: Re: Secure pages Vince Vielhaber <vev@michvhf.com>
2001-11-16 18:11 ` Re: Re: Secure pages Marc G. Fournier <scrappy@hub.org>
2001-11-16 19:12 ` Re: Re: Secure pages Vince Vielhaber <vev@michvhf.com>
@ 2001-11-16 19:25 ` Marc G. Fournier <scrappy@hub.org>
2001-11-26 14:23 ` Re: Re: Secure pages Vince Vielhaber <vev@michvhf.com>
0 siblings, 1 reply; 22+ messages in thread
From: Marc G. Fournier @ 2001-11-16 19:25 UTC (permalink / raw)
To: Vince Vielhaber <vev@michvhf.com>; +Cc: speedboy <speedboy@nomicrosoft.org>; pgsql-php
from what I could tell, yes ... might have been unintentioinal, but, if
that's the case, they can re-subscribe :)
On Fri, 16 Nov 2001, Vince Vielhaber wrote:
> On Fri, 16 Nov 2001, Marc G. Fournier wrote:
>
> >
> > the offending user has been removed from the list ...
>
> I didn't look at the headers, you mean someone actually sent them
> and it wasn't a logjam somewhere?
>
> >
> >
> > On Fri, 16 Nov 2001, Vince Vielhaber wrote:
> >
> > > On Fri, 16 Nov 2001, speedboy wrote:
> > >
> > > > On Tue, 13 Mar 2001, Dan Wilson wrote:
> > > >
> > > > Is anyone else getting crap spewed at them from as far back as March on
> > > > this list?
> > >
> > > yep
> > >
> > > Vince.
> > > --
> > > ==========================================================================
> > > Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
> > > 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
> > > Online Campground Directory http://www.camping-usa.com
> > > Online Giftshop Superstore http://www.cloudninegifts.com
> > > ==========================================================================
> > >
> > >
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 2: you can get off all lists at once with the unregister command
> > > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> > >
> >
> >
>
>
> Vince.
> --
> ==========================================================================
> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
> 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
> Online Campground Directory http://www.camping-usa.com
> Online Giftshop Superstore http://www.cloudninegifts.com
> ==========================================================================
>
>
>
>
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 18:45 ` Re: Re: Secure pages Dan Wilson <phpPgAdmin@acucore.com>
2001-11-16 07:41 ` Re: Re: Secure pages speedboy <speedboy@nomicrosoft.org>
2001-11-16 15:47 ` Re: Re: Secure pages Vince Vielhaber <vev@michvhf.com>
2001-11-16 18:11 ` Re: Re: Secure pages Marc G. Fournier <scrappy@hub.org>
2001-11-16 19:12 ` Re: Re: Secure pages Vince Vielhaber <vev@michvhf.com>
2001-11-16 19:25 ` Re: Re: Secure pages Marc G. Fournier <scrappy@hub.org>
@ 2001-11-26 14:23 ` Vince Vielhaber <vev@michvhf.com>
0 siblings, 0 replies; 22+ messages in thread
From: Vince Vielhaber @ 2001-11-26 14:23 UTC (permalink / raw)
To: Marc G. Fournier <scrappy@hub.org>; +Cc: speedboy <speedboy@nomicrosoft.org>; pgsql-php
This arrived promptly. :)
On Fri, 16 Nov 2001, Marc G. Fournier wrote:
>
> from what I could tell, yes ... might have been unintentioinal, but, if
> that's the case, they can re-subscribe :)
>
>
>
> On Fri, 16 Nov 2001, Vince Vielhaber wrote:
>
> > On Fri, 16 Nov 2001, Marc G. Fournier wrote:
> >
> > >
> > > the offending user has been removed from the list ...
> >
> > I didn't look at the headers, you mean someone actually sent them
> > and it wasn't a logjam somewhere?
> >
> > >
> > >
> > > On Fri, 16 Nov 2001, Vince Vielhaber wrote:
> > >
> > > > On Fri, 16 Nov 2001, speedboy wrote:
> > > >
> > > > > On Tue, 13 Mar 2001, Dan Wilson wrote:
> > > > >
> > > > > Is anyone else getting crap spewed at them from as far back as March on
> > > > > this list?
> > > >
> > > > yep
> > > >
> > > > Vince.
> > > > --
> > > > ==========================================================================
> > > > Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
> > > > 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
> > > > Online Campground Directory http://www.camping-usa.com
> > > > Online Giftshop Superstore http://www.cloudninegifts.com
> > > > ==========================================================================
> > > >
> > > >
> > > >
> > > >
> > > > ---------------------------(end of broadcast)---------------------------
> > > > TIP 2: you can get off all lists at once with the unregister command
> > > > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> > > >
> > >
> > >
> >
> >
> > Vince.
> > --
> > ==========================================================================
> > Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
> > 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
> > Online Campground Directory http://www.camping-usa.com
> > Online Giftshop Superstore http://www.cloudninegifts.com
> > ==========================================================================
> >
> >
> >
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
@ 2001-03-13 19:18 ` Michael Fork <mfork@toledolink.com>
2001-03-13 19:24 ` Re: Re: Secure pages David Olbersen <dave@slickness.org>
1 sibling, 1 reply; 22+ messages in thread
From: Michael Fork @ 2001-03-13 19:18 UTC (permalink / raw)
To: Timothy_Maguire@hartehanks.com; +Cc: Paul Joseph McGee <mcgee@student.cs.ucc.ie>; pgsql-php
The easiest way in PHP that I have found is to create a file called
validate.php containing the following:
<?
if ($HTTP_COOKIE_VARS["MyCookie"] != 'Some Value') {
header("Location: http://my.company.com/login";);
}
?>
and, after the user has logged in, set a cookie. Then, for each page that
should be for a logged-in user only, just include the validate.php file.
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Tue, 13 Mar 2001 Timothy_Maguire@hartehanks.com wrote:
>
> if you are using apache web server you can try the .htaccess method. I am
> not too familar with it. I am trying to learn it myself, but from what i
> gather, you put a file called .htaccess in the dir where your web page is.
> the .htaccess file contains a path to the a file where all the user names
> and passwords are stored. whenever this dir is accessed, a window pops up
> asking for a user id and password.
>
> If anyone has more info on this, please pass it on. I am looking into
> using this as well. What i am looking to do is create a web based ftp
> application. Where users log into a web screen and can ftp files to the
> server into a certain directory own by them. I am storing the file paths
> and descriptions in a postgresql db and using php for the ftp process. Can
> I use .htaccess with this? Can I have someone log into the web page using
> .htaccess and passing their user id and password into a cookie or variable
> so i will know who they are and they don't have to re-type this when they
> ftp the file.
>
> Any help would be great.
> Thanks,
> Tim.
>
>
>
>
> Paul Joseph McGee <mcgee@student.cs.ucc.ie>@postgresql.org on 03/13/2001
> 12:20:57 PM
>
> Sent by: pgsql-php-owner@postgresql.org
>
>
> To: pgsql-php@postgresql.org
> cc:
>
> Subject: Secure pages
>
>
> Hi everybody,
> i have a user login authentication sysytem on my machine here where users
> may view pages but to do other things the user must login. the login
> scripts seem to work ok and are based on a "Secure Authentication System"
> from www.phpbuilder.com. Basically the page where i want people to arrive
> at upon logging in is at present viewable by anyone who puts the proper
> url into their browser. how do i keep this and other pages secure from
> people who havent logged in?
> Thanks,
> Paul
>
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 19:18 ` Re: Re: Secure pages Michael Fork <mfork@toledolink.com>
@ 2001-03-13 19:24 ` David Olbersen <dave@slickness.org>
2001-03-13 19:50 ` Re: Re: Secure pages Michael Fork <mfork@toledolink.com>
0 siblings, 1 reply; 22+ messages in thread
From: David Olbersen @ 2001-03-13 19:24 UTC (permalink / raw)
To: Michael Fork <mfork@toledolink.com>; +Cc: Timothy_Maguire@hartehanks.com; Paul Joseph McGee <mcgee@student.cs.ucc.ie>; pgsql-php
On Tue, 13 Mar 2001, Michael Fork wrote:
->The easiest way in PHP that I have found is to create a file called
->validate.php containing the following:
->
-><?
-> if ($HTTP_COOKIE_VARS["MyCookie"] != 'Some Value') {
-> header("Location: http://my.company.com/login";);
-> }
->?>
->
->and, after the user has logged in, set a cookie. Then, for each page that
->should be for a logged-in user only, just include the validate.php file.
Boy that's not very secure...I could find your included file, see what 'Some
Value' is, and then just make my own cookie!
-- Dave
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 19:18 ` Re: Re: Secure pages Michael Fork <mfork@toledolink.com>
2001-03-13 19:24 ` Re: Re: Secure pages David Olbersen <dave@slickness.org>
@ 2001-03-13 19:50 ` Michael Fork <mfork@toledolink.com>
2001-03-13 19:50 ` Re: Re: Secure pages David Olbersen <dave@slickness.org>
0 siblings, 1 reply; 22+ messages in thread
From: Michael Fork @ 2001-03-13 19:50 UTC (permalink / raw)
To: David Olbersen <dave@slickness.org>; +Cc: Timothy_Maguire@hartehanks.com, Paul Joseph McGee <mcgee@student.cs.ucc.ie>; pgsql-php
not if the include file ends with a .php -- since it is in <? ?>, anybody
acessing the file from a web browser would not be able to see it.
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Tue, 13 Mar 2001, David Olbersen wrote:
> On Tue, 13 Mar 2001, Michael Fork wrote:
>
> ->The easiest way in PHP that I have found is to create a file called
> ->validate.php containing the following:
> ->
> -><?
> -> if ($HTTP_COOKIE_VARS["MyCookie"] != 'Some Value') {
> -> header("Location: http://my.company.com/login";);
> -> }
> ->?>
> ->
> ->and, after the user has logged in, set a cookie. Then, for each page that
> ->should be for a logged-in user only, just include the validate.php file.
>
> Boy that's not very secure...I could find your included file, see what 'Some
> Value' is, and then just make my own cookie!
>
> -- Dave
>
>
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 19:18 ` Re: Re: Secure pages Michael Fork <mfork@toledolink.com>
2001-03-13 19:24 ` Re: Re: Secure pages David Olbersen <dave@slickness.org>
2001-03-13 19:50 ` Re: Re: Secure pages Michael Fork <mfork@toledolink.com>
@ 2001-03-13 19:50 ` David Olbersen <dave@slickness.org>
0 siblings, 0 replies; 22+ messages in thread
From: David Olbersen @ 2001-03-13 19:50 UTC (permalink / raw)
To: Michael Fork <mfork@toledolink.com>; +Cc: Timothy_Maguire@hartehanks.com; Paul Joseph McGee <mcgee@student.cs.ucc.ie>; pgsql-php
On Tue, 13 Mar 2001, Michael Fork wrote:
->not if the include file ends with a .php -- since it is in <? ?>, anybody
->acessing the file from a web browser would not be able to see it.
I misunderstood, I thought you meant that you would put that code in an included
file. Which anybody could get at. However the code being hidden doesn't change
that I could look for a cookie from your domain, see it's value, and still
create another cookie.
What you're all looking for is a *session based* authentication system. PHP does
this, and you can do it yourself if you have a database set up.
-- Dave
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
@ 2001-03-13 20:48 Timothy_Maguire@hartehanks.com
2001-03-13 22:23 ` RE: Re: Re: Secure pages Christian Marschalek <cm@chello.at>
2001-03-13 22:32 ` RE: Re: Re: Secure pages Chris <csmith@squiz.net>
0 siblings, 2 replies; 22+ messages in thread
From: Timothy_Maguire@hartehanks.com @ 2001-03-13 20:48 UTC (permalink / raw)
To: David Olbersen <dave@slickness.org>; +Cc: Michael Fork <mfork@toledolink.com>; Timothy_Maguire@hartehanks.com; Paul Joseph McGee <mcgee@student.cs.ucc.ie>; pgsql-php
what i have sone in the past for passwords on web pages is have something
like:
<?
if(md5($MyCookie) != "anencryptedpassword") {
header("Location:http//homepage.com/whatever");
}
that way even if someone got the file and wanted to find out what the "some
value" was it would be encrypted.
There are probably still ways around this, but for the info you are hiding
from people, this is probably safe enough, at least for me it is.
David Olbersen <dave@slickness.org>@postgresql.org on 03/13/2001 02:50:45
PM
Sent by: pgsql-php-owner@postgresql.org
To: Michael Fork <mfork@toledolink.com>
cc: <Timothy_Maguire@hartehanks.com>, Paul Joseph McGee
<mcgee@student.cs.ucc.ie>, <pgsql-php@postgresql.org>
Subject: Re: Re: Secure pages
On Tue, 13 Mar 2001, Michael Fork wrote:
->not if the include file ends with a .php -- since it is in <? ?>, anybody
->acessing the file from a web browser would not be able to see it.
I misunderstood, I thought you meant that you would put that code in an
included
file. Which anybody could get at. However the code being hidden doesn't
change
that I could look for a cookie from your domain, see it's value, and still
create another cookie.
What you're all looking for is a *session based* authentication system. PHP
does
this, and you can do it yourself if you have a database set up.
-- Dave
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
^ permalink raw reply [nested|flat] 22+ messages in thread
* RE: Re: Re: Secure pages
2001-03-13 20:48 Re: Re: Secure pages Timothy_Maguire@hartehanks.com
@ 2001-03-13 22:23 ` Christian Marschalek <cm@chello.at>
2001-03-13 22:42 ` Re: Re: Re: Secure pages Martin A. Marques <martin@math.unl.edu.ar>
1 sibling, 1 reply; 22+ messages in thread
From: Christian Marschalek @ 2001-03-13 22:23 UTC (permalink / raw)
To: pgsql-php
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;)
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Re: Secure pages
2001-03-13 20:48 Re: Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 22:23 ` RE: Re: Re: Secure pages Christian Marschalek <cm@chello.at>
@ 2001-03-13 22:42 ` Martin A. Marques <martin@math.unl.edu.ar>
2001-03-14 01:39 ` RE: Re: Re: Secure pages Christian Marschalek <cm@chello.at>
0 siblings, 1 reply; 22+ messages in thread
From: Martin A. Marques @ 2001-03-13 22:42 UTC (permalink / raw)
To: Christian Marschalek <cm@chello.at>; pgsql-php
El Mar 13 Mar 2001 19:23, Christian Marschalek escribió:
> 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">
Horrible idea!! Even with an encrypted password. Use PHP sessions, and save
any info on the session (this is saved on a temp file on the server, and only
the session handle is passed to the browser).
--
System Administration: It's a dirty job,
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués email: martin@math.unl.edu.ar
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------
^ permalink raw reply [nested|flat] 22+ messages in thread
* RE: Re: Re: Secure pages
2001-03-13 20:48 Re: Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 22:23 ` RE: Re: Re: Secure pages Christian Marschalek <cm@chello.at>
2001-03-13 22:42 ` Re: Re: Re: Secure pages Martin A. Marques <martin@math.unl.edu.ar>
@ 2001-03-14 01:39 ` Christian Marschalek <cm@chello.at>
0 siblings, 0 replies; 22+ messages in thread
From: Christian Marschalek @ 2001-03-14 01:39 UTC (permalink / raw)
To: pgsql-php
> Horrible idea!! Even with an encrypted password. Use PHP
> sessions, and save
> any info on the session (this is saved on a temp file on the
> server, and only
> the session handle is passed to the browser).
okido :)
> System Administration: It's a dirty job,
> but someone told I had to do it.
i realy like that sentence :)
^ permalink raw reply [nested|flat] 22+ messages in thread
* RE: Re: Re: Secure pages
2001-03-13 20:48 Re: Re: Secure pages Timothy_Maguire@hartehanks.com
@ 2001-03-13 22:32 ` Chris <csmith@squiz.net>
2001-03-14 01:40 ` RE: Re: Re: Secure pages Christian Marschalek <cm@chello.at>
2001-03-14 04:13 ` RE: Re: Re: Secure pages Chris <csmith@squiz.net>
1 sibling, 2 replies; 22+ messages in thread
From: Chris @ 2001-03-13 22:32 UTC (permalink / raw)
To: pgsql-php
>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
^ permalink raw reply [nested|flat] 22+ messages in thread
* RE: Re: Re: Secure pages
2001-03-13 20:48 Re: Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 22:32 ` RE: Re: Re: Secure pages Chris <csmith@squiz.net>
@ 2001-03-14 01:40 ` Christian Marschalek <cm@chello.at>
1 sibling, 0 replies; 22+ messages in thread
From: Christian Marschalek @ 2001-03-14 01:40 UTC (permalink / raw)
To: pgsql-php; Chris <csmith@squiz.net>
> 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;
> }
> ?>
will do.. what excatly are session variables?
> 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 :)
globalise? there are no global variables in php, are they?;)
regards
^ permalink raw reply [nested|flat] 22+ messages in thread
* RE: Re: Re: Secure pages
2001-03-13 20:48 Re: Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 22:32 ` RE: Re: Re: Secure pages Chris <csmith@squiz.net>
@ 2001-03-14 04:13 ` Chris <csmith@squiz.net>
1 sibling, 0 replies; 22+ messages in thread
From: Chris @ 2001-03-14 04:13 UTC (permalink / raw)
To: Christian Marschalek <cm@chello.at>; pgsql-php
Hey,
> > 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;
> > }
> > ?>
>
>will do.. what excatly are session variables?
check out http://www.php.net/manual/en/ref.session.php for session info..
> > 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 :)
>
>globalise? there are no global variables in php, are they?;)
With functions, you can either pass variables or reference variables
outside the function (for example, with a login function)... if they aren't
passed to the function & need to be referenced, they have to be a global
variable. Example below..
If you don't globalise the variable, then the form action will be nothing,
because the function doesn't know what it is or where to get it's value
from. Make sense?
function print_login_form () {
global $PHP_SELF;
?>
<form method="post" action="<? echo $PHP_SELF ?>">
Name
<input type="text" value="">
<br><br>
Password
<input type="password" value="">
<br><br>
<input type="submit" value="Log In">
</form>
<?
}
HTH
------------------------
Chris Smith
http://www.squiz.net
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Re: Secure pages
@ 2001-11-16 10:23 Duncan Adams (DNS) <duncan.adams@vcontractor.co.za>
0 siblings, 0 replies; 22+ messages in thread
From: Duncan Adams (DNS) @ 2001-11-16 10:23 UTC (permalink / raw)
To: pgsql-php
yip 123 messages today
-----Original Message-----
From: speedboy [mailto:speedboy@nomicrosoft.org]
Sent: Friday, November 16, 2001 9:42 AM
To: pgsql-php@postgresql.org
Subject: Re: [PHP] Re: Secure pages
On Tue, 13 Mar 2001, Dan Wilson wrote:
Is anyone else getting crap spewed at them from as far back as March on
this list?
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
^ permalink raw reply [nested|flat] 22+ messages in thread
end of thread, other threads:[~2001-11-26 14:23 UTC | newest]
Thread overview: 22+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-13 17:20 Secure pages Paul Joseph McGee <mcgee@student.cs.ucc.ie>
2001-03-13 22:23 ` Grant <grant@conprojan.com.au>
2001-03-13 18:07 Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 18:45 ` Dan Wilson <phpPgAdmin@acucore.com>
2001-11-16 07:41 ` speedboy <speedboy@nomicrosoft.org>
2001-11-16 15:47 ` Vince Vielhaber <vev@michvhf.com>
2001-11-16 18:11 ` Marc G. Fournier <scrappy@hub.org>
2001-11-16 19:12 ` Vince Vielhaber <vev@michvhf.com>
2001-11-16 19:25 ` Marc G. Fournier <scrappy@hub.org>
2001-11-26 14:23 ` Vince Vielhaber <vev@michvhf.com>
2001-03-13 19:18 ` Michael Fork <mfork@toledolink.com>
2001-03-13 19:24 ` David Olbersen <dave@slickness.org>
2001-03-13 19:50 ` Michael Fork <mfork@toledolink.com>
2001-03-13 19:50 ` David Olbersen <dave@slickness.org>
2001-03-13 20:48 Re: Re: Secure pages Timothy_Maguire@hartehanks.com
2001-03-13 22:23 ` Christian Marschalek <cm@chello.at>
2001-03-13 22:42 ` Martin A. Marques <martin@math.unl.edu.ar>
2001-03-14 01:39 ` Christian Marschalek <cm@chello.at>
2001-03-13 22:32 ` Chris <csmith@squiz.net>
2001-03-14 01:40 ` Christian Marschalek <cm@chello.at>
2001-03-14 04:13 ` Chris <csmith@squiz.net>
2001-11-16 10:23 Re: Re: Secure pages Duncan Adams (DNS) <duncan.adams@vcontractor.co.za>
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