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

Bug#1057267: bookworm-pu: package phpldapadmin/1.2.6.3-0.3+deb12u1



Subject: bookworm-pu: package phpldapadmin/1.2.6.3-0.3+deb12u1
Package: release.debian.org
User: release.debian.org@packages.debian.org
Usertags: pu
Tags: bookworm
Severity: normal

[ Reason ]

Some users have older PHP versions than the one from bookworm, phpldapadmin is compatible with most of the recent ones.
But the patch that was distributed at the time of packaging was limited to PHP 8.1+ and got outdated by a newer one that is compatible with more PHP versions.

[ Impact ]

The users will no be able to login to phpldapadmin on older PHP versions.

[ Tests ]

The fix was distributed by upstream on newer versions.
This fix/patch was successfully tested in production by myself.

[ Risks ]

None. The patch is trivial.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]

I changed the type check to what upstream did provide after I had patched the file myself for PHP 8.1+ only.

[ Other info ]

Reported as https://github.com/leenooks/phpLDAPadmin/issues/231 and https://github.com/leenooks/phpLDAPadmin/issues/230

Salsa CI did build this successfully: https://salsa.debian.org/php-team/pear/phpldapadmin/-/pipelines/574472

diff -Nru phpldapadmin-1.2.6.3/debian/changelog phpldapadmin-1.2.6.3/debian/changelog
--- phpldapadmin-1.2.6.3/debian/changelog	2023-03-19 00:10:35.000000000 +0100
+++ phpldapadmin-1.2.6.3/debian/changelog	2023-09-04 12:14:31.000000000 +0200
@@ -1,3 +1,9 @@
+phpldapadmin (1.2.6.3-0.3+deb12u1) bookworm; urgency=medium
+
+  * Update the patch for PHP 7.4 LDAP login to work like PHP 8.1
+
+ -- William Desportes <williamdes@wdes.fr>  Mon, 04 Sep 2023 12:14:31 +0200
+
 phpldapadmin (1.2.6.3-0.3) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru phpldapadmin-1.2.6.3/debian/patches/Fix-ldap-connect-PHP-8.1-is-now-a-class.patch phpldapadmin-1.2.6.3/debian/patches/Fix-ldap-connect-PHP-8.1-is-now-a-class.patch
--- phpldapadmin-1.2.6.3/debian/patches/Fix-ldap-connect-PHP-8.1-is-now-a-class.patch	2023-03-19 00:10:35.000000000 +0100
+++ phpldapadmin-1.2.6.3/debian/patches/Fix-ldap-connect-PHP-8.1-is-now-a-class.patch	2023-09-04 12:13:31.000000000 +0200
@@ -5,12 +5,15 @@
 Ref: https://www.php.net/manual/en/function.ldap-connect.php#refsect1-function.ldap-connect-changelog
 
 In 8.1.0 -> Returns an LDAP\Connection instance now; previously, a resource was returned.
+
+Origin: upstream
+Forwarded: https://github.com/leenooks/phpLDAPadmin/commit/b035e8a0f4f49633c2492a07f0182eefb311848d
 ---
  lib/ds_ldap.php | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php
-index 9537ff2..f465207 100644
+index 9537ff2..2f82eda 100644
 --- a/lib/ds_ldap.php
 +++ b/lib/ds_ldap.php
 @@ -216,7 +216,7 @@ class ldap extends DS {
@@ -18,7 +21,7 @@
  				$resource,$this->getValue('server','host'),$this->getValue('server','port'));
  
 -		if (! is_resource($resource))
-+		if (! $resource instanceof \LDAP\Connection)
++		if (!$resource)
  			debug_dump_backtrace('UNHANDLED, $resource is not a resource',1);
  
  		# Go with LDAP version 3 if possible (needed for renaming and Novell schema fetching)
@@ -27,7 +30,7 @@
  
  		# If we didnt log in...
 -		if (! is_resource($connect) || $this->noconnect || ! $this->userIsAllowedLogin($userDN)) {
-+		if (! $connect instanceof \LDAP\Connection || $this->noconnect || ! $this->userIsAllowedLogin($userDN)) {
++		if (!$connect || $this->noconnect || ! $this->userIsAllowedLogin($userDN)) {
  			$this->logout($method);
  
  			return false;

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


Reply to: