changeset 89:3d1f584aea60

small fix in the activator and secure cookie
author wizard
date Wed, 21 Apr 2010 17:39:45 +0400
parents 0d2337e203c0
children dc1da0389db7
files Lib/IMPL/Config/Activator.pm Lib/IMPL/Web/QueryHandler/SecureCookie.pm
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/IMPL/Config/Activator.pm	Tue Apr 20 20:25:29 2010 +0400
+++ b/Lib/IMPL/Config/Activator.pm	Wed Apr 21 17:39:45 2010 +0400
@@ -44,7 +44,7 @@
         push @args,  map UNIVERSAL::isa($_,'IMPL::Config::Activator') ? $_->activate : $_, @_ if @_;
         
         my $factory = $this->factory;
-        eval "require $factory; 1;" unless not ref $factory and _is_class($factory);
+        eval "require $factory; 1;" unless ref $factory or _is_class($factory);
         
         return $this->object($factory->new(@args));
     } else {
--- a/Lib/IMPL/Web/QueryHandler/SecureCookie.pm	Tue Apr 20 20:25:29 2010 +0400
+++ b/Lib/IMPL/Web/QueryHandler/SecureCookie.pm	Wed Apr 21 17:39:45 2010 +0400
@@ -41,9 +41,9 @@
 			)
 		) {
 			
-			my $context = $action->application->security->Session(
-				id => $sid				
-			);
+			my $context = $action->application->security->sourceSession->find(
+				{ id => $sid }
+			) or return $nextHandler->();
 			
 			my ($result,$challenge) = $context->auth->ValidateSession($cookie);