Up to [cvs.NetBSD.org] / pkgsrc / databases / py-ldap
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
py-ldap: updated to 3.4.5 Released 3.4.5 2025-10-10 Security fixes: * CVE-2025-61911 (GHSA-r7r6-cc7p-4v5m): Enforce ``str`` input in ``ldap.filter.escape_filter_chars`` with ``escape_mode=1``; ensure proper escaping. (thanks to lukas-eu) * CVE-2025-61912 (GHSA-p34h-wq7j-h5v6): Correct NUL escaping in ``ldap.dn.escape_dn_chars`` to ``\00`` per RFC 4514. (thanks to aradona91) Fixes: * ReconnectLDAPObject now properly reconnects on UNAVAILABLE, CONNECT_ERROR and TIMEOUT exceptions (previously only SERVER_DOWN), fixing reconnection issues especially during server restarts * Fixed syncrepl.py to use named constants instead of raw decimal values for result types * Fixed error handling in SearchNoOpMixIn to prevent a undefined variable error Tests: * Added comprehensive reconnection test cases including concurrent operation handling and server restart scenarios Doc/ * Updated installation docs and fixed various documentation typos * Added ReadTheDocs configuration file Infrastructure: * Add testing and document support for Python 3.13
Fix PLIST after py-setuptools update; bump depends and revision
py-ldap: updated to 3.4.4 Released 3.4.4 2022-11-17 Fixes: * Reconnect race condition in ReconnectLDAPObject is now fixed * Socket ownership is now claimed once we've passed it to libldap * LDAP_set_option string formats are now compatible with Python 3.12 Doc/ * Security Policy was created * Broken article links are fixed now * Bring Conscious Language improvements Infrastructure: * Add testing and document support for Python 3.10, 3.11, and 3.12
py-ldap: updated to 3.4.3 Released 3.4.3 2022-09-15 This is a minor release to bring back the removed OPT_X_TLS option. Please note, it's still a deprecated option and it will be removed in 3.5.0. The following deprecated option has been brought back: - ``OPT_X_TLS`` Fixes: * Sphinx documentation is now successfully built * pypy3 tests stability was improved * setup.py deprecation warning is now resolved
py-ldap: updated to 3.4.2 Released 3.4.2 2022-07-06 This is a minor release to provide out-of-the-box compatibility with the merge of libldap and libldap_r that happened with OpenLDAP's 2.5 release. The following undocumented functions are deprecated and scheduled for removal: - ``ldap.cidict.strlist_intersection`` - ``ldap.cidict.strlist_minus`` - ``ldap.cidict.strlist_union`` The following deprecated option has been removed: - ``OPT_X_TLS`` Doc/ * SASL option usage has been clarified Lib/ * ppolicy control definition has been updated to match Behera draft 11 Modules/ * By default, compile against libldap, checking whether it provides a threadsafe implementation at runtime * When decoding controls, the module can now distinguish between no value (now exposed as ``None``) and an empty value (exposed as ``b''``) * Several new OpenLDAP options are now supported: * ``OPT_SOCKET_BIND_ADDRESSES`` * ``OPT_TCP_USER_TIMEOUT`` * ``OPT_X_SASL_MAXBUFSIZE`` * ``OPT_X_SASL_SECPROPS`` * ``OPT_X_TLS_ECNAME`` * ``OPT_X_TLS_PEERCERT`` * ``OPT_X_TLS_PROTOCOL``-related options and constants Fixes: * Encoding/decoding of boolean controls has been corrected * ldap.schema.models.Entry is now usable * ``method`` keyword to ReconnectLDAPObject.bind_s is now usable
py-ldap: updated to 3.3.0 Release 3.3.0: Highlights: * ``LDAPError`` now contains additional fields, such as ctrls, result, msgid * ``passwd_s`` can now extract the newly generated password * LDAP connections can now be made from a file descriptor This release is tested on Python 3.8, and the beta of Python 3.9. The following undocumented functions are deprecated and scheduled for removal: - ``ldap.cidict.strlist_intersection`` - ``ldap.cidict.strlist_minus`` - ``ldap.cidict.strlist_union`` Modules/ * Ensure ReconnectLDAPObject is not left in an inconsistent state after a reconnection timeout * Syncrepl now correctly parses SyncInfoMessage when the message is a syncIdSet * Release GIL around global get/set option call * Do not leak serverctrls in result functions * Don't overallocate memory in attrs_from_List() * Fix thread support check for Python 3 * With OpenLDAP 2.4.48, use the new header openldap.h Lib/ * Fix some edge cases regarding quoting in the schema tokenizer * Fix escaping a single space in ldap.escape_dn_chars * Fix string formatting in ldap.compare_ext_s * Prefer iterating dict instead of calling dict.keys() Doc/ * Clarify the relationship between initialize() and LDAPObject() * Improve documentation of TLS options * Update FAQ to include Samba AD-DC error message "Operation unavailable without authentication" * Fix several incorrect examples and demos (but note that these are not yet tested) * Update Debian installation instructions for Debian Buster * Typo fixes in docs and docstrings Test/ * Test and document error cases in ldap.compare_s * Test if reconnection is done after connection loss * Make test certificates valid for the far future * Use slapd -Tt instead of slaptest Infrastructure: * Mark the LICENCE file as a license for setuptools * Use "unittest discover" rather than "setup.py test" to run tests
py-ldap: updated to 3.1.0 Released 3.1.0: This release brings two minor API changes: - Long-deprecated functions ldap.open() and ldap.init() are removed - LDAPObject.compare_s() and compare_ext_s return bool instead of 0 or 1 All changes since 3.0.0: Lib/ * Remove long deprecated functions ldap.open() and ldap.init() * LDAPObject.compare_s() and LDAPObject.compare_ext_s() now return a bool instead of 1 or 0. * Make iteration over cidict yield same values as keys() * Fail if pyasn1 is not installed * Fix parsing of PPolicyControl ASN.1 structure * Use items() when appropriate in dict iteration * Add support for tracing LDAP calls. Tracing can now be enabled with the env var PYTHON_LDAP_TRACE_LEVEL and redirected to a file with PYTHON_LDAP_TRACE_FILE. (This is mainly intended for debugging and internal testing; the configuration or output may change in future versions.) Modules/ * Fix ref counting bug in LDAPmessage_to_python Doc/ * Remove warning about unreleased version * Doc: Replace Mac OS X -> macOS Tests/ * Add tests and coverage for tracing * Disable warnings-as-errors for Python 3.4 * Fix assertTrue to assertEqual * Mark several test values as bytes Lib/slapdtest/ * Fix error message for missing commands * Make SlapdObject a context manager * Disable SASL external when missing SASL support * Make SlapdObject.root_dn a property * In SlapdObject, build include directives dynamically * Move import statements to top level Code style: * Add Makefile rules for automatic formatting of C and Python code * Reformat and indent all C files * Trim white space throughout the project Infrastructure: * Add py3-trace tox environment to Travis CI config * Add new Pytest cache directory to gitignore General: * Update all pypi.python.org URLs to pypi.org Released 3.0.0: Notable changes since 2.4.45 (please see detailed logs below): * Python 3 support and bytes_mode see: https://python-ldap.readthedocs.io/en/latest/bytes_mode.html * The module ldap.async is renamed to ldap.asyncsearch * New dependencies: pyasn1, pyasn1_modules * Dropped support for Python 2.6 and 3.3
py-ldap: updated to 2.5.2 Release 2.5.2: * code-cleaning in setup.py Modules/ * PyBytes_ instead of PyString_ and added PyInt_FromLong compat macro * moved code from version.c to ldapmodule.c * removed obsolete back-ward compability constants from common.h * build checks whether LDAP_API_VERSION is OpenLDAP 2.4.x * _ldap.__author__ and _ldap.__license__ also set from ldap.pkginfo * assume C extension API for Python 2.7+ Lib/ * removed all dependencies on modules string and types * removed use of .has_key() * removed class ldap.ldapobject.NonblockingLDAPObject * new global constant ldap.LIBLDAP_API_INFO * right after importing _ldap there is a call into libldap to initialize it * method .decodeControlValue() of SSSResponseControl and VLVResponseControl does not set class attribute result_code anymore * always use bytes() for UUID() constructor in ldap.syncrepl * module ldif now uses functions b64encode() and b64decode() * fixed pickling and restoring of ReconnectLDAPObject * more modules with PEP-8 compliance * ldap.ldapobject split into module-package Tests/ * scripts do not directly call SlapdTestCase.setUpClass() anymore * added LDIF test with folded, base64-encoded attribute * added more tests for sub-module ldap.dn * added tests for ldap.syncrepl
py-ldap: updated to 2.5.1 Changes since 2.4.45: Mandatory prerequisites: - Python 2.7.x - pyasn1 0.3.7+ and pyasn1_modules 0.1.5+ Modules/ * removed unused code schema.c Lib/ * ldap.__version__, ldap.__author__ and ldap.__license__ now imported from new sub-module ldap.pkginfo also to setup.py * Added safety assertion when importing _ldap: ldap.pkginfo.__version__ must match _ldap.__version__ * removed stand-alone module dsml * slapdtest.SlapdObject.restart() just restarts slapd without cleaning any data * Compability changes for pyasn1 0.3.x or newer (thanks to Ilya Etingof and Christian Heimes) * The methods SSSResponseControl.decodeControlValue() and VLVResponseControl.decodeControlValue() now follow the coding convention to use camel-cased ASN.1 name as class attribute name. The old class names are still set for back-ward compability but should not be used in new code because they might be removed in a later release. * removed SSSRequestControl from ldap.controls.KNOWN_RESPONSE_CONTROLS Tests/ * added explicit reconnect tests for ReconnectLDAPObject
PLIST also should have been updated
Changes 2.4.27: Lib/ * added 'strf_secs' and 'strp_secs' to ldap.functions.__all__ * fixed regression introduced with 2.4.26: ldif.LDIFParser did not fully parse LDIF records without trailing empty separator line
Changes 2.4.22: Lib/ * LDIFParser now also accepts value-spec without a space after the colon. * Added key-word argument authz_id to LDAPObject methods sasl_non_interactive_bind_s(), sasl_external_bind_s() and sasl_gssapi_bind_s() * Hmmpf! Added missing self to LDAPObject.fileno(). * ReconnectLDAPObject.sasl_bind_s() now correctly uses generic wrapper arguments *args,**kwargs * LDIFParser.parse_change_records() now correctly calls LDIFParser.handle_change_modify() * Corrected ldap.controls.pwdpolicy.__all__ Doc/ * Started missing docs for sub-module ldap.sasl.
Changes 2.4.19: * Fixed missing ReconnectLDAPObject._reconnect_lock when pickling * Added ldap.controls.pagedresults which is pure Python implementation of Simple Paged Results Control (see RFC 2696) and delivers the correct result size
Update to 2.4.16: Released 2.4.16 2014-09-10 Changes since 2.4.15: Lib/ * New convenience function ldap.dn.is_dn() * New convenience function ldap.escape_str() * New convenience methods LDAPObject.read_s() and LDAPObject.find_unique_entry() * Fixed invoking start_tls_s() in ReconnectLDAPObject.reconnect() (thanks to Philipp Hahn)
Update to 2.4.15. Replace interpreter path in installed file. Released 2.4.15 2014-03-24 Changes since 2.4.14: Lib/ * Added missing modules ldap.controls.openldap and ldap.controls.pwdpolicy to setup.py * Added missing imports to ldap.controls.pwdpolicy * Fixed ldap.controls.pwdpolicy.decodeControlValue() to decode string of digits * Support for X-SUBST in schema element class LDAPSyntax * Support for X-ORDERED and X-ORIGIN in schema element class AttributeType * ldapurl: New scope 'subordinates' defined in draft-sermersheim-ldap-subordinate-scope Modules/ * New constant ldap.SCOPE_SUBORDINATE derived from ldap.h for draft-sermersheim-ldap-subordinate-scope * Fixed constant ldap.sasl.CB_GETREALM (thanks to Martin Pfeifer)
Changes 2.4.14: Lib/ * Added ldap.controls.openldap.SearchNoOpControl * New method ldap.async.AsyncSearchHandler.afterFirstResult() for doing something right after successfully receiving but before processing first result * Better log data written when invoking ldap.LDAPLock.acquire() and ldap.LDAPLock.release() * LDAPObject and friends now pass `desc' to ldap.LDAPLock() which results in better logging * ldapobject.ReconnectLDAPObject now uses internal class-wide lock for serializing reconnects * Method signature of ReconnectLDAPObject.reconnect() changed to be able to call it with separate retry_max and retry_delay values Modules/ * Added support for retrieving negotiated TLS version/cipher with LDAPObject.get_option() with the help of upcoming OpenLDAP libs
Changes 2.4.6: Lib/ * ldap.controls.ppolicy: Another fix for decoding the password policy response control Changes 2.4.5: Installation: * defines for SASL and SSL in setup.cfg to be more friendly to Python setup tools (easy_install) Lib/ * Fixed typo in ldap.functions._ldap_function_call() which always released ldap._ldap_module_lock instead of local lock * ldap.controls.ppolicy: Fixed decoding the password policy response control Demo/ * Demo script for ldap.controls.ppolicy
Changes 2.4.3: Lib/ * Mostly corrected/updated __doc__ strings Doc/ * Corrected rst files * Added missing modules, functions, classes, methods, parameters etc. at least as auto-generated doc Changes 2.4.2: Logging: * pprint.pformat() is now used when writing method/function arguments to the trace log ldap.schema.subentry: * SubSchema.__init__() now has new key-word argument check_uniqueness which enables checking whether OIDs are unique in the subschema subentry * Code-cleaning: consequent use of method SubSchema.getoid() instead of accessing SubSchema.name2oid directly. * SubSchema.getoid() and SubSchema.getoid() now have key-word argument raise_keyerror=0 and raise KeyError with appropriate description.
Changes 2.4.1: Modules: * New LDAP option OPT_X_TLS_PACKAGE available in OpenLDAP 2.4.26+ to determine the name of the SSL/TLS package OpenLDAP was built with Lib/ * ldap.modlist.modifyModlist(): New key-word argument case_ignore_attr_types used to define attribute types for which comparison of old and new values should be case-insensitive * Minor changes to which data is sent to debug output for various trace levels * Now tag [1] is used in ldap.extop.dds.RefreshResponse in compliance with RFC 2589 (fix available for OpenLDAP ITS-6886) * New sub-module ldap.controls.sessiontrack implements request control as described in draft-wahl-ldap-session (needs pyasn1_modules) Changes since 2.4.0: * OpenLDAP 2.4.11+ required to build * Support for extracting LDAPv3 extended controls in LDAP_RES_SEARCH_ENTRY responses (see SF-2829057, thanks to Rich) * Generic support for LDAPv3 extended operations (thanks to Rich) Lib/ * new class API in ldap.controls, not backwards-compatible! * new sub-modules for ldap.controls, some require pyasn1 and pyasn1_modules * New methods LDAPObject.result4() and LDAPObject.extop_result() * New (optional) class ldap.controls.AssertionControl * New helper module ldap.logger contains file-like object which sends trace messages to logging.log() * Removed non-functional method LDAPObject.set_cache_options() * Removed unused dictionary ldap.controls.knownLDAPControls Modules/ * ldapcontrol.c: Fixed encode_assertion_control() and function is no longer hidden behind ifdef-statement
Changes 2.3.12: Lib * Removed tabs from various modules to make things work with python -tt. * Quick fix to ldif.is_dn() to let multi-valued RDNs pass as valid. Is too liberal in some corner-cases though... * Fix to ldif.is_dn() to allow dashes in attribute type * ldap.open() now outputs a deprecation warning * module-wide locking is now limited to calling _ldap.initialize(). Still ldap.functions._ldap_function_call() is used to wrap all calls for writing debug log. Modules * New LDAP options available in OpenLDAP 2.4.18+ supported in LDAPObject.get/set_option(): ldap.OPT_X_KEEPALIVE_IDLE, ldap.OPT_X_KEEPALIVE_PROBES, ldap.OPT_X_KEEPALIVE_INTERVAL, ldap.OPT_X_TLS_CRLCHECK, ldap.OPT_X_TLS_CRLFILE Doc * Various small updates/improvements
Remove @dirrm entries from PLISTs
Update py-ldap to 2.3.8. ---------------------------------------------------------------- Released 2.3.8 2009-04-30 Changes since 2.3.7: Lib/ * ldap.schema.models: More fault-tolerant parsing of SYNTAX in AttributeTypeDescription * ldap.schema.tokenizer.split_tokens(): More tolerant parsing of items separated only with a DOLLAR without surrounding white-spaces (because WSP is declared as zero or more spaces in RFC 4512) ---------------------------------------------------------------- Released 2.3.7 2009-04-09 Changes since 2.3.6: Lib/ * urllib.quote() is now used in LDAPUrlExtension.unparse() to quote all special URL characters in extension values Modules/ * Fixed ldapcontrol.c not to raise ldap.ENCODING_ERROR in function encode_rfc2696() on 64-bit systems * Fixed seg fault if error code in a LDAP response was outside the known error codes and could not be mapped to a specific exception class (thanks to Sean) * errors.c: LDAP_ERROR_MAX set to LDAP_PROXIED_AUTHORIZATION_DENIED if available in OpenLDAP header * new exception class ldap.PROXIED_AUTHORIZATION_DENIED if available in OpenLDAP header * Fixed functions.c not to raise ldap.ENCODING_ERROR in function l_ldap_str2dn() on 64-bit systems (see SF#2725356) ---------------------------------------------------------------- Released 2.3.6 2009-02-22 Changes since 2.3.5: Lib/ * Importing ldap.str2dn() which directly imported _ldap.str2dn() is prohibited now (see SF#2181141) Modules/ * get_option(): Added support for reading more SASL options. (OPT_X_SASL_MECH, OPT_X_SASL_REALM, OPT_X_SASL_AUTHCID and OPT_X_SASL_AUTHZID) * Added some explicit type casts to fix issues while building with SunStudio * Fixed compiling issue with GCC 4.4 (see SF#2555793, thanks to Matej and Martin) Doc/ * Clarified not to use ldap_get_dn() directly * Fixed description of ldap.SASL_AVAIL and ldap.TLS_AVAIL (see SF#2555804, thanks to Matej and Martin) ---------------------------------------------------------------- Released 2.3.5 2008-07-06 Changes since 2.3.4: Lib/ * Fixed methods ldap.cidict.__contains__() and ldap.schema.models.Entry.__contains__() * FWIW method LDAPObject.cancel_s() returns a result now * Fixed ldap.schema.models.NameForm: Class attribute oc is now of type string, not tuple to be compliant with RFC 4512 ---------------------------------------------------------------- Released 2.3.4 2008-03-29 Changes since 2.3.3: Modules/ * Fixed seg fault when calling LDAPObject.get_option() (see SF#1926507, thanks to Matej) ---------------------------------------------------------------- Released 2.3.3 2008-03-26 Changes since 2.3.2: Fixed backward-compability when building with OpenLDAP 2.3.x libs. ---------------------------------------------------------------- Released 2.3.2 2008-03-26 Changes since 2.3.1: Lib/ * ldap.dn.escape_dn_chars() now really adheres to RFC 4514 section 2.4 by escaping null characters and a space occurring at the beginning of the string * New method ldap.cidict.cidict.__contains__() * ldap.dn.explode_dn() and ldap.dn.explode_rdn() have a new optional key-word argument flags which is passed to ldap.dn.str2dn(). Modules/ * Removed unused OPT_PRIVATE_EXTENSION_BASE from constants.c Doc/ * Various additions, updates, polishing (thanks to James).
Changes 2.3.0: * Support for setuptools (building .egg, thanks to Torsten) * Support for matched values control * Fixed ldif * ldap.schema.models: SUP now separated by $ * Added constant MOD_INCREMENT to support modify+increment extension Changes 2.2.1: * OpenLDAP 2.3+ required now to build. * Added support for Cancel operation ext. op. if supported in OpenLDAP API of the libs used for the build. * Removed deprecated code for setting options by name * Added l_ldap_cancel()
Update to 2.2.0, provided by Yoshito Komatsu in PR 33478: ---------------------------------------------------------------- Released 2.2.0 2006-04-10 Changes since 2.0.11: * OpenLDAP 2.2+ required now to build. Modules/ * Dropped all occurences of '#ifdef #LDAP_VENDOR_VERSION'. * Fixed wrong tuple size in l_ldap_result3() (see SF#1368108) * Fixed get_option(ldap.OPT_API_INFO) (see SF#1440165) * Fixed memory leak in l_ldap_result3() when all=0 (see SF#1457325) * Fixed memory leak in l_ldap_result3() in error cases (see SF#1464085) Lib/ * Fixed ldap.schema.models.DITStructureRule.__str__() to separate SUP rule-ids with a single space instead of ' $ ' * Fixed ldap.async.Dict * Added ldap.async.IndexedDict * ldap.schema.subentry.SubSchema.attribute_types() has new key-word argument ignore_dit_content_rule ---------------------------------------------------------------- Released 2.0.11 2005-11-07 Changes since 2.0.10: Lib/ * Class ldap.ldapobject.LDAPObject: Each method returns a result now * Class ldap.ldapobject.ReconnectLDAPObject: Some methods called the wrong methods of LDAPObject. Fixed. * Added new class ldap.async.Dict * Slightly cleaned up ldap.schema.subentry.attribute_types() * New sub-module ldap.resiter which simply provides a mix-in class for ldap.ldapobject.LDAPObject with a generator method allresults(). Obviously this only works with Python 2.3+. And it's still experimental.
update to 2.0.9 many feature additions and fixes since 2.0.2, see the CHANGES file in the distribution for details
Update to version 2.0.0pre15, provided by David Ferlier in PR 24138 and slightly reworked by myself. David will now maintain it. The 2.x series support OpenLDAP 2.x. From then an incomplete list of changes is available in the CHANGES file of the distfile.