[Jifty-commit] r3164 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Apr 22 19:33:52 EDT 2007
Author: jesse
Date: Sun Apr 22 19:33:50 2007
New Revision: 3164
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/LetMe.pm
Log:
r55807 at pinglin: jesse | 2007-04-22 19:19:36 -0400
* More debugging info for broken letmes
Modified: jifty/trunk/lib/Jifty/LetMe.pm
==============================================================================
--- jifty/trunk/lib/Jifty/LetMe.pm (original)
+++ jifty/trunk/lib/Jifty/LetMe.pm Sun Apr 22 19:33:50 2007
@@ -97,7 +97,7 @@
return '' unless ($user->auth_token);
-
+ Jifty->log->debug($user->id."Creating a digest of", join (', ', $user->auth_token, $self->path, $self->until));
# build an md5sum of the email token and until and our secret
my $digest = Digest::MD5->new();
$digest->add( $user->auth_token );
@@ -221,6 +221,7 @@
sub _generate_token {
my $self = shift;
my %args = (email => undef, @_);
+ warn "Generating a token for ".YAML::Dump(\%args);
return join ('/',
$args{'email'},
$self->path,
@@ -273,18 +274,22 @@
# email must exist
unless ($self->_user_from_email($self->email)) {
+ Jifty->log->debug("Token validation failed - Invalid user");
return undef;
}
unless ($self->path) {
+ Jifty->log->debug("Token validation failed - Invalid path");
return undef;
}
unless ($self->checksum_provided) {
+ Jifty->log->debug("Token validation failed - Checksum not provided");
return undef;
}
unless ($self->_correct_checksum_provided) {
+ Jifty->log->debug("Token validation failed - Checksum not correct");
return undef;
}
@@ -301,11 +306,13 @@
sub _correct_checksum_provided {
my $self = shift;
+ Jifty->log->debug("LetMe checksum: ".$self->checksum_provided . " vs ". $self->generate_checksum );
return undef
unless ( $self->checksum_provided eq $self->generate_checksum )
or
( $self->checksum_provided eq $self->generate_koremutake_checksum );
+ return 1;
}
1;
More information about the Jifty-commit
mailing list