Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Password Protection

by Anonymous Monk
on Oct 29, 2001 at 02:59 UTC ( #121858=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm brand new to pearl. I've tried to understand it but I don't have enough time. I just want simple to use code that I could place in my html. I want code that would allow users to create their own name and password to log into a special area of my site.

Comment on Password Protection
Re: Password Protection
by Jazz (Curate) on Oct 29, 2001 at 04:13 UTC
    Since it sounds like time may be lacking for you, a premade solution may best serve your needs.

      Frankly, I would be rather wary of using those. It's an unfortunate fact that 99% of cgi programs on the web roll their own parameter parsers, don't use strict, and so on. If one were to suggest a premade solution, make it from someone a with better coding habits. Heck, one might even learn some Perl in the process..

      Update: Toned down the negativity about the above-mentioned URL, on the basis that there is a non-zero chance that at least one of them might be written correctly.

      perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^+*`^ ve^#$&V"+@( NO CARRIER'

        The quality of scripts there is about the same as those listed in CGI Resource Index. Of course, they're not all bad (You'll find NMS listed there for example), but you should exercise caution wherever you download your copy-paste scripts from (including perlmonks).

        I don't mean that in a bad way, but it's prudent.

        Simon Flack ($code or die)
        $,=reverse'"ro_';s,$,\$,;s,$,lc ref sub{},e;$,
        =~y'_"' ';eval"die";print $_,lc substr$@,0,3;
Re: Password Protection
by cfreak (Chaplain) on Oct 29, 2001 at 20:42 UTC
    If you are running Apache it would probably be much simpler to use HTACCESS on the area of your site that you want to protect.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://121858]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-09-20 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (155 votes), past polls