Introduction
You need to create a simple password protected content management system coupled with a cookie
editor.

Environment
Assignment will be tested on a computer with installed Apache and mod_perl. Your files will be put in a
directory which is mapped to the server path /comp2405/assgn3. The following configuration options
will be enabled for this directory:

•  Files *.pl and *.cgi will be handled by mod_perl
•  AllowOverride All
•  Options All
•  AccessFileName .htaccess
•  RewriteEngine On
•  DirectoryIndex index.html index.pl
Mod_rewrite will be loaded.

The following perl modules will be installed:
File::Spec::Functions, File::Basename,  CGI.pm, File::CSV.

Please note that all these modules except File::CSV are included in the standard IndigoPerl installation.
Assignment will be tested using the Firefox browser.

Assignment

ii. .htaccess file that shall make sure that passwd.csv is not accessible through the
web
iii. index.pl – if authorization cookie is not set, or set incorrectly, shall display a form to input user name a password; if combination user name and password is correct, set  cookie named auth_cookie with values of username and password (for example, you can use ability of CGI.pm to  put a reference to list to cookie value).In this case, or  if  cookie already is set correctly, shall redirect to main.pl.
iv. main.pl
1.  if authorization cookie is not set, or set incorrectly, shall redirect to index.pl
2.  Shall list .txt files in the cont/ subdirectory and display links to cont/<filename>.html
3.  Shall have a form to upload .txt file into cont/ subdirectory
4.  Shall have a link to cookie editor
5.  Shall have logout button
v. /cont subdirectory
1.  Shall have .htaccess file redirecting all requests to this directory (/comp2405/assgn3/cont/….) to contenthandler.pl (/comp2405/assgn3/contenthandler.pl)
vi. contenthandler.pl
1.  if authorization cookie is not set, or set incorrectly, shall redirect to index.pl
2.  When invoked after redirection from  cont/<filename>.html shall display
a.  content of cont/filename.txt with <> and & escaped
b.  Link to main.pl
vii. Cookieeditor.pl
1.  if authorization cookie is not set, or set incorrectly, shall redirect to index.pl
2.  Shall display a list of cookies set
3.  Shall provide functionality to delete a cookie
4.  Shall provide functionality to set
5.  No javascript usage is allowed for this assignment

Скачать архив

    9 Авг 2009 by freetonik

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

1 Response to 03: Perl

Avatar

» Perl Computer Science Student

Сентябрь 28th, 2009 at 2:10

[...] cms на perl’е. Текст задания и решение доступны совсем рядом. 9 Авг 2009 by [...]

Comment Form


Warning: Parameter 1 to id_generic_callback() expected to be a reference, value given in /home/users/f/freetonik/domains/css.freetonik.com/wp-content/plugins/intensedebate/intensedebate.php on line 911

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 19398091 bytes) in /home/users/f/freetonik/domains/css.freetonik.com/wp-includes/wp-db.php on line 450