Projects
Kolab:3.4
php-pear-Net-LDAP3
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
php-pear-Net-LDAP3.spec
Changed
@@ -24,12 +24,16 @@ Name: php-Net-LDAP3 %endif Version: 1.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Object oriented interface for searching and manipulating LDAP-entries Group: Development/Libraries License: LGPLv3 URL: http://kolab.org + Source0: pear-Net-LDAP3-%{version}.tar.gz +Patch1: 0001-no-password-logging.patch +Patch2: 0002-fix-fatal-entries-call.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -43,6 +47,8 @@ %prep %setup -q -n pear-Net-LDAP3-%{version} +%patch1 -p1 + %build %install @@ -65,6 +71,10 @@ %{_datadir}/%{php}/Net/LDAP3/Result.php %changelog +* Fri Aug 29 2014 Daniel Hoffend <dh@dotlan.net> - 1.0.0-2 +- Fix PHP Fatal Error Call +- Don't log ldap passwords + * Thu Aug 14 2014 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.0.0-1 - Package for Fedora/EPEL
View file
0001-no-password-logging.patch
Added
@@ -0,0 +1,93 @@ +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
Added
@@ -0,0 +1,23 @@ +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
debian.changelog
Changed
@@ -1,3 +1,10 @@ +php-net-ldap3 (1.0.0-0~kolab3) unstable; urgency=low + + * Fixed PHP Fatal Error + * Don't log ldap passwords + + -- Daniel Hoffend <dh@dotlan.net> Fri, 29 Aug 2014 15:27:46 +0100 + php-net-ldap3 (1.0.0-0~kolab2) unstable; urgency=low * The dependency shall be php5, not php
View file
debian.series
Changed
@@ -0,0 +1,2 @@ +0001-no-password-logging.patch -p1 +0002-fix-fatal-entries-call.patch -p1
View file
php-net-ldap3.dsc
Changed
@@ -2,7 +2,7 @@ Source: php-net-ldap3 Binary: php-net-ldap3 Architecture: all -Version: 1.0.0-0~kolab1 +Version: 1.0.0-0~kolab3 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Homepage: http://kolab.org Standards-Version: 3.9.3
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
.