CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:



Oct 11, 2001, 3:40 AM

Post #1 of 2 (2071 views)
Security Can't Post

I want to provide a single user with access to a virtual control panel.

How do I make the directory which hold the data secure and password protect that area?

Also How do I get the user to enter a username and password via the standard windows or netscape password required form?

Any help gratefully received.




Oct 12, 2001, 3:45 AM

Post #2 of 2 (2062 views)
Re: Security [In reply to] Can't Post

Password direcories needs to be supported by your server. It's done with a .htaccess file, but I don't know the details.

To make a control panel (for administrators only), you need to make an login screen (HTML). A CGI application will eventually make a cookie (both user and pass), and return that cookie in the header of a next 'You're logging in' document. If the browser stores the cookie, you're logged in.

It's even possible to crypt the password with the crypt() function (see the perldoc for it's usage). Finally, it's better a make a secure cookie, which is transfered only when a https connection is established.

My forum uses such techniques.

Off course, you can place your control panel CGI in a password protected directory, which is much better (I never did it however).


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives