in reply to Cookies Tutorial
Always use '-t' mode for your cgi scripts, it instructs Perl to taint any outside input. Also remember, anything you put in a cookie is stored in plain text unless you encrypt it before you place it in the cookie.#!/usr/bin/perl -t use CGI; my $q = CGI->new; $session{"user_id"}=$userid; $session{"password"}=$passwd; $session{"timecode"}=$time; $cookie = $q->cookie(-name=>'sessionID', -value=>\%session, -expires=>'+6h', -secure=>0); print $q->redirect(-uri=>"index.cgi", -cookie=>$cookie);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Cookies Tutorial
by herveus (Prior) on Jan 26, 2005 at 12:28 UTC |