pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/p5-Apache2-AuthCookieDBI/patches (www/p5-Apache2-A...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8e87aef99529
branches:  trunk
changeset: 417894:8e87aef99529
user:      mef <mef%pkgsrc.org@localhost>
date:      Sun Nov 17 13:28:22 2019 +0000

description:
(www/p5-Apache2-AuthCookieDBI) remove patch, sorry

diffstat:

 www/p5-Apache2-AuthCookieDBI/patches/patch-lib_Apache2_AuthCookieDBI.pm |  69 ----------
 1 files changed, 0 insertions(+), 69 deletions(-)

diffs (73 lines):

diff -r 7ca91608e8ab -r 8e87aef99529 www/p5-Apache2-AuthCookieDBI/patches/patch-lib_Apache2_AuthCookieDBI.pm
--- a/www/p5-Apache2-AuthCookieDBI/patches/patch-lib_Apache2_AuthCookieDBI.pm   Sun Nov 17 13:27:28 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-$NetBSD: patch-lib_Apache2_AuthCookieDBI.pm,v 1.1 2015/04/07 08:06:14 he Exp $
-
-Quoting database identifiers with backticks as is done in 2.17 is
-not portable, and only works with a MySQL backend.  Instead, use
-the DBI quote_identifier method as hinted in
-https://rt.cpan.org/Public/Bug/Display.html?id=101561
-
---- lib/Apache2/AuthCookieDBI.pm.orig  2012-12-06 03:41:41.000000000 +0000
-+++ lib/Apache2/AuthCookieDBI.pm
-@@ -615,12 +615,16 @@ sub _get_crypted_password {
- 
-     my $crypted_password = EMPTY_STRING;
- 
-+    my $PasswordField = $dbh->quote_identifier($c{'DBI_PasswordField'});
-+    my $UsersTable = $dbh->quote_identifier($c{'DBI_UsersTable'});
-+    my $UserField = $dbh->quote_identifier($c{'DBI_UserField'});
-+
-     my $sql_query = <<"SQL";
--      SELECT `$c{'DBI_PasswordField'}`
--      FROM `$c{'DBI_UsersTable'}`
--      WHERE `$c{'DBI_UserField'}` = ?
--      AND (`$c{'DBI_PasswordField'}` != ''
--      AND `$c{'DBI_PasswordField'}` IS NOT NULL)
-+      SELECT $PasswordField
-+      FROM $UsersTable
-+      WHERE $UserField = ?
-+      AND ($PasswordField != ''
-+      AND $PasswordField IS NOT NULL)
- SQL
-     my $sth = $dbh->prepare_cached($sql_query);
-     $sth->execute($user);
-@@ -964,11 +968,15 @@ sub group {
-     my $dbh = $class->_dbi_connect($r) || return Apache2::Const::SERVER_ERROR;
- 
-     # Now loop through all the groups to see if we're a member of any:
-+    my $DBI_GroupUserField = $dbh->quote_identifier($c{'DBI_GroupUserField'});
-+    my $DBI_GroupsTable = $dbh->quote_identifier($c{'DBI_GroupsTable'});
-+    my $DBI_GroupField = $dbh->quote_identifier($c{'DBI_GroupField'});
-+
-     my $sth = $dbh->prepare_cached( <<"EOS" );
--SELECT `$c{'DBI_GroupUserField'}`
--FROM `$c{'DBI_GroupsTable'}`
--WHERE `$c{'DBI_GroupField'}` = ?
--AND `$c{'DBI_GroupUserField'}` = ?
-+SELECT $DBI_GroupUserField
-+FROM $DBI_GroupsTable
-+WHERE $DBI_GroupField = ?
-+AND $DBI_GroupUserField = ?
- EOS
-     foreach my $group (@groups) {
-         $sth->execute( $group, $user );
-@@ -999,10 +1007,14 @@ sub user_is_active {
-     }
- 
-     my $dbh = $class->_dbi_connect($r) || return;
-+    my $ActiveFieldName = $dbh->quote_identifier($active_field_name);
-+    my $DBI_UsersTable = $dbh->quote_identifier($c{'DBI_UsersTable'});
-+    my $DBI_UserField  = $dbh->quote_identifier($c{'DBI_UserField'});
-+
-     my $sql_query = <<"SQL";
--      SELECT `$active_field_name`
--      FROM `$c{'DBI_UsersTable'}`
--      WHERE `$c{'DBI_UserField'}` = ?
-+      SELECT $ActiveFieldName
-+      FROM $DBI_UsersTable
-+      WHERE $DBI_UserField = ?
- SQL
- 
-     my $sth = $dbh->prepare_cached($sql_query);



Home | Main Index | Thread Index | Old Index