Skip to content

ldif.LDIFParser support for add and delete operations added. #567 - #568

Open
fager wants to merge 1 commit into
python-ldap:mainfrom
fager:fager/change-567
Open

fager wants to merge 1 commit into
python-ldap:mainfrom
fager:fager/change-567

Conversation

@fager

@fager fager commented May 15, 2024

Copy link
Copy Markdown

Implementation of the parser for add and delete operations in LDIF change files for Issue #567

@fager
fager marked this pull request as draft May 15, 2024 19:49
@quanah

quanah commented May 17, 2024

Copy link
Copy Markdown
Contributor

Might be worthwhile to squash this into a single commit

@mistotebe

Copy link
Copy Markdown
Contributor

Hi @fager, were you interested in finishing this PR (at least to support modrdn)? I can take over otherwise

@mistotebe mistotebe added this to the 3.5.0 milestone Aug 28, 2026
@mistotebe
mistotebe marked this pull request as ready for review September 10, 2026 14:28
Comment thread Lib/ldif.py
deleteoldrdn = False
if k is not None:
if k.lower() == 'deleteoldrdn':
deleteoldrdn = (v == b'1')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we require deleteoldrdn and validate that its value is exactly 0 or 1 before calling handle_modrdn? Just so stuff like deleteoldrdn: true or deleteoldrdn: 2 is not silently turned into False. Also the surrounding branches accept the field being absent.
IIUC, RFC 2849 makes this field mandatory.
So possibly we can raiseValueError for missing/invalid flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants