[Xitami] Password protected Perl CGI.

Michael xitami@lists.xitami.org
Mon, 13 Aug 2001 14:30:47 -0400


If all you want to do is keep the contents of a text script private, why not 
use a simple script to call the actual working script which is kept in a 
different location not visible to the internet?   You can point to scripts and 
pass variables anywhere ~ to other local drives or other machines.  You 
and your scripts have complete access.  To the internet user only the 
calling script is visible.

You could also cripple the working script so that it only responds to local 
calls from your machine and bails out if not.

If working remotely you can pass a field variable to the machine so it 
recognizes you.

Not sure about your multiplatform and privacy needs but you should 
consider using programming software with compilers.

Michael



On 13 Aug 2001, at 11:50, David Michaels wrote:

> Morning.
> 
> A 2 part challenge.  This CGI is running on a Win32 platform, but I would like the solution to work on any.  I've got a few hours of Googling on this but don't seem to be hitting the right keyword combos, and I couldn't find anything helpful in the local bookstore computer section.  I've read 
through the O'reilly DBI, CGI.pm, Programming Perl and Perl Cookbook manuals and the cpan.org security mods section but haven't found what I'm looking for.
> 
> First part.  I have been searching for a simple way to password protect a Perl CGI program.  (I'm using CGI.pm and DBI.pm).  I don't need heavy authentication, just basic security - something to keep casual browsers out.  Is there a Perl module that can supply this functionality?  If so, is 
there a HOWTO?  If not, has anyone written a secure front-end (Perl or HTML/CGI.pm) to a Perl CGI that they are willing to share?  I can see how to do it without a libmod, but I think I'd just be re-inventing, and probably not as well as someone who does this all the time.
> 
> Second part.  At this time, a user can bookmark this CGI location, bypassing any password protection scheme.  Is there some way around this using Perl and/or HTML?  I've seen this with forms using ASP or PHP but haven't found it with Perl.  It seems to me that the CGI is static, and I can't 
think of a way to keep it from being loaded if someone goes directly to the page, unless the password code is an integral part of the code itself - but this becomes a hassle for folks who are doing multiple entries (20 -30) at one session.
> 
> All helpful thoughts accepted.  I will compile and post the results to ADV-HTML, including replies from other lists referenced.
> 
> Aloha!
> 
> David
> 
> ______________________________________________________
> David Michaels
> Technology Development Office, College of Education, USC
> 
> 
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami