Skip Menu |

This queue is for tickets about the Apache2-AuthCookieDBI CPAN distribution.

Report information
The Basics
Id: 45207
Status: resolved
Worked: 1 hour (60 min)
Left: 30 min
Priority: 0/
Queue: Apache2-AuthCookieDBI

People
Owner: matisse [...] spamcop.net
Requestors: h.dudeness [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.04
Fixed in: 2.05



Subject: Database connection
I was having troubles logging into my system. Should this line: # get the crypted password from the users database for this user. my $dbh = DBI->connect_cached( $c{DBI_DSN}, $c{DBI_user}, $c{DBI_password} ); be this: # get the crypted password from the users database for this user. my $dbh = DBI->connect_cached( $c{DBI_DSN}, $c{DBI_User}, $c{DBI_Password} );
I apologize. I think I should have added this too. I believe this: my $sth = $dbh->prepare_cached( <<"EOS" ); SELECT $c->{ DBI_passwordfield } FROM $c->{ DBI_userstable } WHERE $c->{ DBI_userfield } = ? EOS Should be this: my $sth = $dbh->prepare_cached( <<"EOS" ); SELECT $c->{ DBI_PasswordField } FROM $c->{ DBI_UsersTable } WHERE $c->{ DBI_UserField } = ? EOS
You are right - the hash keys used in the code are wrong in a few places. I have a new version with corrections, and improved the test coverage. I need to get permission at work to release code, so it may take a week or two.
From: msuchy [...] redhat.com
Dne st 22.dub.2009 05:03:15, h.dudeness napsal(a): Show quoted text
> I apologize. I think I should have added this too. I believe this: > my $sth = $dbh->prepare_cached( <<"EOS" ); > SELECT $c->{ DBI_passwordfield } > FROM $c->{ DBI_userstable } > WHERE $c->{ DBI_userfield } = ? > EOS > > Should be this: > my $sth = $dbh->prepare_cached( <<"EOS" ); > SELECT $c->{ DBI_PasswordField } > FROM $c->{ DBI_UsersTable } > WHERE $c->{ DBI_UserField } = ? > EOS > >
DBI_passwordfield should IMHO stay the same. This patch works for me.
Download patch
application/octet-stream 1.6k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #45207] Database connection
Date: Tue, 5 May 2009 16:37:36 -0500
To: bug-Apache2-AuthCookieDBI [...] rt.cpan.org
From: Matt M <h.dudeness [...] gmail.com>
I can apply the patch then try again. I thought I was running into problems because the user table (DBI_UsersTable) and user field (DBI_UserField) are defined with mixed case: my %CONFIG_DEFAULT = ( DBI_DSN => undef, DBI_SecretKey => undef, DBI_User => undef, DBI_Password => undef, DBI_UsersTable => 'users', DBI_UserField => 'user', DBI_passwordfield => 'password', DBI_crypttype => 'none', DBI_groupstable => 'groups', DBI_groupfield => 'grp', DBI_groupuserfield => 'user', DBI_encryptiontype => 'none', DBI_sessionlifetime => '00-24-00-00', DBI_sessionmodule => 'none', ); Show quoted text
> Dne st 22.dub.2009 05:03:15, h.dudeness napsal(a):
>> I apologize. I think I should have added this too. I believe this: >>     my $sth = $dbh->prepare_cached( <<"EOS" ); >> SELECT $c->{ DBI_passwordfield } >> FROM $c->{ DBI_userstable } >> WHERE $c->{ DBI_userfield } = ? >> EOS >> >> Should be this: >>     my $sth = $dbh->prepare_cached( <<"EOS" ); >> SELECT $c->{ DBI_PasswordField } >> FROM $c->{ DBI_UsersTable } >> WHERE $c->{ DBI_UserField } = ? >> EOS >> >>
> > DBI_passwordfield should IMHO stay the same. > > This patch works for me. > >
I have a new release ready, and am waiting on permission from work to post it. (I need to get clearance on releasing as Open Source any software that I write.) Should be a day or two.
I have uploaded the new version, 2.05, to PAUSE and it should show up in a CPAN near you soon.