[gantry] r1482 committed - Fixed a typo in the eval lookup missing a parenthesis. Also re-insert...

1 view
Skip to first unread message

codesite...@google.com

unread,
Feb 17, 2011, 3:44:18 PM2/17/11
to gan...@googlegroups.com
Revision: 1482
Author: num...@gmail.com
Date: Thu Feb 17 12:43:55 2011
Log: Fixed a typo in the eval lookup missing a parenthesis. Also
re-inserted the $self->can('get_auth_schema') check.
http://code.google.com/p/gantry/source/detail?r=1482

Modified:
/trunk/lib/Gantry/Plugins/AuthCookie.pm

=======================================
--- /trunk/lib/Gantry/Plugins/AuthCookie.pm Thu Feb 17 12:11:00 2011
+++ /trunk/lib/Gantry/Plugins/AuthCookie.pm Thu Feb 17 12:43:55 2011
@@ -2,6 +2,7 @@
use strict; use warnings;

use Gantry::Utils::HTML qw( :all );
+use Gantry::Utils::Crypt;

use Crypt::CBC;
use MIME::Base64;
@@ -824,10 +825,10 @@
}
else {
eval {
+
my $password_field = $self->auth_password_field();
my $password_to_auth;
- if($self->auth_password_encryption(){
- require Gantry::Utils::Crypt;
+ if($self->auth_password_encryption()){
my $salt = $self->auth_password_salt ||
$self->auth_secret();
my $crypt_obj = Gantry::Utils::Crypt->new(
{ 'secret' => $salt }
@@ -838,7 +839,10 @@
$password_to_auth = $in{'password'};
}

- my $sch = $self->get_auth_schema();
+ my $sch = $self->can( 'get_auth_schema' )
+ ? $self->get_auth_schema()
+ : $self->get_schema();
+
my $row = $sch->resultset( $self->auth_table() )->search( {
$self->auth_user_field() => $in{username},
} )->next;

Reply all
Reply to author
Forward
0 new messages