Mercurial > pub > Impl
diff Lib/IMPL/Web/QueryHandler/SecureCookie.pm @ 97:964587c5183c
Added SecureCall to Web QueryHandlers stack
many bug fixes to Security and Web Application modules
author | wizard |
---|---|
date | Tue, 04 May 2010 04:04:37 +0400 |
parents | 67eb8eaec3d4 |
children | a9f4ba4783eb |
line wrap: on
line diff
--- a/Lib/IMPL/Web/QueryHandler/SecureCookie.pm Fri Apr 30 15:03:38 2010 +0400 +++ b/Lib/IMPL/Web/QueryHandler/SecureCookie.pm Tue May 04 04:04:37 2010 +0400 @@ -23,6 +23,8 @@ return undef unless $nextHandler; + local $IMPL::Security::authority = $this; + my $method = $action->query->cookie('method') || 'simple'; if ($method eq 'simple') { @@ -42,8 +44,6 @@ $this->salt ) ) { - local $IMPL::Security::authority = $this; - my $context = $action->application->security->sourceSession->find( { id => $sid } ) or return $nextHandler->(); @@ -56,9 +56,11 @@ } else { return $nextHandler->(); } + } else { + return $nextHandler->(); } } else { - die new IMPL::Exception("Unknown auth method",$method); + return $nextHandler->(); } } @@ -72,10 +74,10 @@ $this->salt ); - $this->setCookie(sid => $sid); - $this->setCookie(sdata => $cookie); - $this->setCookie(sign => $sign); - $this->setCookie(method => $method) if $method; + $response->setCookie(sid => $sid); + $response->setCookie(sdata => $cookie); + $response->setCookie(sign => $sign); + $response->setCookie(method => $method) if $method; } 1;