Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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.

Replies are listed 'Best First'.
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?
[Discipulus]: ;=)
[Discipulus]: you are rigth: 2018 had less bad days than 2017, until now!
[Discipulus]: if i had to go to psycho i need to ask why i always end with over complex datastructure: now i have an HoHoAoH in my object
[Discipulus]: i will need to handle by reference later on
[Eily]: kinda sounds like father Christmas is late
[hippo]: (asking because I'm sure you said before about learning English) Did you know there are 2 different words for smaller quantities in English? They are "less" and "fewer". Fewer applies to a number of discrete things like days.
Eily notes also
[hippo]: So if you don't drink as much milk and not as often you are said to drink less milk on fewer days. Confusing, eh?

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2018-01-23 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (242 votes). Check out past polls.

    Notices?