Projects
Kolab:3.4:Updates
php-pear-Net-LDAP3
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 10
View file
php-pear-Net-LDAP3.spec
Changed
@@ -31,8 +31,7 @@ URL: http://kolab.org Source0: pear-Net-LDAP3-%{version}.tar.gz -Patch1: 0001-no-password-logging.patch -Patch2: 0002-fix-fatal-entries-call.patch +Patch1: no-password-logging_fix-fatal-error.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch
View file
0001-no-password-logging.patch
Deleted
@@ -1,93 +0,0 @@ -diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php -index 1b3ac73..4d2082a 100644 ---- a/lib/Net/LDAP3.php -+++ b/lib/Net/LDAP3.php -@@ -481,7 +481,7 @@ class Net_LDAP3 - return true; - } - -- $this->_debug("C: Bind [dn: $bind_dn] [pass: $bind_pw]"); -+ $this->_debug("C: Bind [dn: $bind_dn]"); - - if (@ldap_bind($this->conn, $bind_dn, $bind_pw)) { - $this->_debug("S: OK"); -@@ -742,9 +742,14 @@ class Net_LDAP3 - '"*"', - ); - -- $command = implode(' ', $command); -+ // remove password from debug log -+ $command_debug = $command; -+ $command_debug[11] = '*'; - -- $this->_debug("LDAP: Executing command: $command"); -+ $command = implode(' ', $command); -+ $command_debug = implode(' ', $command_debug); -+ -+ $this->_debug("LDAP: Executing command: $command_debug"); - - exec($command, $output, $return_code); - -@@ -1435,7 +1440,7 @@ class Net_LDAP3 - $method = 'DIGEST-MD5'; - } - -- $this->_debug("C: Bind [mech: $method, authc: $authc, authz: $authz] [pass: $pass]"); -+ $this->_debug("C: Bind [mech: $method, authc: $authc, authz: $authz]"); - - if (ldap_sasl_bind($this->conn, null, $pass, $method, null, $authc, $authz)) { - $this->_debug("S: OK"); -diff --git a/lib/Net/LDAP3/Result.php b/lib/Net/LDAP3/Result.php -index 728b304..0759df0 100644 ---- a/lib/Net/LDAP3/Result.php -+++ b/lib/Net/LDAP3/Result.php -@@ -71,7 +71,7 @@ class Net_LDAP3_Result implements Iterator - } - - /** -- * -+ * Wrapper for ldap_sort() - */ - public function sort($attr) - { -@@ -79,18 +79,23 @@ class Net_LDAP3_Result implements Iterator - } - - /** -- * -+ * Get entries count - */ - public function count() - { -- if (!isset($this->count)) -+ if (!isset($this->count)) { - $this->count = ldap_count_entries($this->conn, $this->result); -+ } - - return $this->count; - } - - /** -+ * Wrapper for ldap_get_entries() - * -+ * @param bool $normalize Optionally normalize the entries to a list of hash arrays -+ * -+ * @return array List of LDAP entries - */ - public function entries($normalize = false) - { -@@ -103,6 +108,14 @@ class Net_LDAP3_Result implements Iterator - return $entries; - } - -+ /** -+ * Wrapper for ldap_get_dn() using the current entry pointer -+ */ -+ public function get_dn() -+ { -+ return $this->current ? ldap_get_dn($this->conn, $this->current) : null; -+ } -+ - - /*** Implement PHP 5 Iterator interface to make foreach work ***/ -
View file
0002-fix-fatal-entries-call.patch
Deleted
@@ -1,23 +0,0 @@ -From 864858dd73f9c6de1a2607b219fabe113133a605 Mon Sep 17 00:00:00 2001 -From: Aleksander Machniak <alec@alec.pl> -Date: Wed, 27 Aug 2014 06:24:45 +0000 -Subject: Fix PHP Fatal error: Call to a member function entries() on a non-object (#3518) - ---- -diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php -index 4d2082a..86c6310 100644 ---- a/lib/Net/LDAP3.php -+++ b/lib/Net/LDAP3.php -@@ -992,7 +992,9 @@ class Net_LDAP3 - - $result = $ldap->search($root_dn, '(objectclass=nsds5replicationagreement)', 'sub', array('nsds5replicahost')); - if (!$result) { -- $this->_debug("No replicas configured"); -+ $this->_debug("No replicas configured on $replica_host"); -+ $ldap->close(); -+ continue; - } - - foreach ($result->entries(true) as $dn => $attrs) { --- -cgit v0.9.0.2
View file
no-password-logging_fix-fatal-error.patch
Added
@@ -0,0 +1,104 @@ +diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php +index 1b3ac73..86c6310 100644 +--- a/lib/Net/LDAP3.php ++++ b/lib/Net/LDAP3.php +@@ -481,7 +481,7 @@ class Net_LDAP3 + return true; + } + +- $this->_debug("C: Bind [dn: $bind_dn] [pass: $bind_pw]"); ++ $this->_debug("C: Bind [dn: $bind_dn]"); + + if (@ldap_bind($this->conn, $bind_dn, $bind_pw)) { + $this->_debug("S: OK"); +@@ -742,9 +742,14 @@ class Net_LDAP3 + '"*"', + ); + +- $command = implode(' ', $command); ++ // remove password from debug log ++ $command_debug = $command; ++ $command_debug[11] = '*'; + +- $this->_debug("LDAP: Executing command: $command"); ++ $command = implode(' ', $command); ++ $command_debug = implode(' ', $command_debug); ++ ++ $this->_debug("LDAP: Executing command: $command_debug"); + + exec($command, $output, $return_code); + +@@ -987,7 +992,9 @@ class Net_LDAP3 + + $result = $ldap->search($root_dn, '(objectclass=nsds5replicationagreement)', 'sub', array('nsds5replicahost')); + if (!$result) { +- $this->_debug("No replicas configured"); ++ $this->_debug("No replicas configured on $replica_host"); ++ $ldap->close(); ++ continue; + } + + foreach ($result->entries(true) as $dn => $attrs) { +@@ -1435,7 +1442,7 @@ class Net_LDAP3 + $method = 'DIGEST-MD5'; + } + +- $this->_debug("C: Bind [mech: $method, authc: $authc, authz: $authz] [pass: $pass]"); ++ $this->_debug("C: Bind [mech: $method, authc: $authc, authz: $authz]"); + + if (ldap_sasl_bind($this->conn, null, $pass, $method, null, $authc, $authz)) { + $this->_debug("S: OK"); +diff --git a/lib/Net/LDAP3/Result.php b/lib/Net/LDAP3/Result.php +index 728b304..0759df0 100644 +--- a/lib/Net/LDAP3/Result.php ++++ b/lib/Net/LDAP3/Result.php +@@ -71,7 +71,7 @@ class Net_LDAP3_Result implements Iterator + } + + /** +- * ++ * Wrapper for ldap_sort() + */ + public function sort($attr) + { +@@ -79,18 +79,23 @@ class Net_LDAP3_Result implements Iterator + } + + /** +- * ++ * Get entries count + */ + public function count() + { +- if (!isset($this->count)) ++ if (!isset($this->count)) { + $this->count = ldap_count_entries($this->conn, $this->result); ++ } + + return $this->count; + } + + /** ++ * Wrapper for ldap_get_entries() + * ++ * @param bool $normalize Optionally normalize the entries to a list of hash arrays ++ * ++ * @return array List of LDAP entries + */ + public function entries($normalize = false) + { +@@ -103,6 +108,14 @@ class Net_LDAP3_Result implements Iterator + return $entries; + } + ++ /** ++ * Wrapper for ldap_get_dn() using the current entry pointer ++ */ ++ public function get_dn() ++ { ++ return $this->current ? ldap_get_dn($this->conn, $this->current) : null; ++ } ++ + + /*** Implement PHP 5 Iterator interface to make foreach work ***/ +
View file
debian.series
Changed
@@ -1,2 +1,1 @@ -0001-no-password-logging.patch -p1 -0002-fix-fatal-entries-call.patch -p1 +no-password-logging_fix-fatal-error.patch -p1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.