> jna wrote:
>
> > Hello,
> >
> > Is anyone using CGI.pm and the built in cookie routine? I just
implemented
> > it on one of my websites storing username and password and retrieving it
for
> > user identification. Problem is it works for me and for alot of other
people
> > but there are a large group of people who it is NOT working for? Has
anyone
> > experienced a split in  browser ability with CGI.pm and its cookies? Is
this
> > a bug or is anyone aware of it? I am certain it cant be my code, else it
> > wouldnt work at all?
> >
> > Snippets:
> >
> > To issue cookie:
> >
> > $the_cookie = $cgi->cookie(-name=>'userdata',
> >                          -value=>\%userdata,
> >                          -expires=>'+15m',
> >                          -path=>'/cgi-bin/path',
> >                          -domain=>'.thedomain.com',
> >                          -secure=>0);
> > print $cgi->header(-cookie=>$the_cookie);
> >
> > to grab cookie:
> >
> > $user = "";
> > $pass = "";
> > %userdata = $cgi->cookie('userdata');
> > foreach ('userid','password','expires') {
> >     $userdata{$_} = $cgi->param($_) || $userdata{$_};
> > }
> > $user = $userdata{'userid'};
> > $pass = $userdata{'password'};
> > $expires = $cgi->cookie('expires');
> >
> > Any thoughts or ideas ?
>
>
> Using a hash for the cookie value is going to concatenate them all
>
> together with &'s.  I would either use multiple cookies or concatenate
> the hash together myself into $value and pass it that way.  I'm not
> sure what the intent was for using a hash for the cookie value.
>
Actually because this was the only combination that actually works (Sorta)
the rest does not even work at all. If i switch the % with @ on:

-value=>\%userdata

or

%userdata = $cgi->cookie('userdata');

The result are that it wont work.? The whole idea for this is a user will
enter his user id and password upon login, the code will authenticate the
combination (Not involved here) then if it passes this check it goes here
and places the userid and password in a cookie in the users browser. Now
everytime we need to check who this user is while logged in, the cookie
pulls his userid and password out of the cookie. Am i attacking this wrong
or something? That still dont explain WHY this works for aroun 80% of my
userbase and NOT for the other %20 ?

Thanks for the $input so far,
John

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to