Pin OID leniency as a decision: RFC 2849 ldap-oid, matched to slapd - #64
Merged
Conversation
IsNumericOid deliberately implements RFC 2849's looser ldap-oid grammar (leading-zero arcs, single-arc OIDs) rather than RFC 4512's numericoid. That is spec-correct on every LDIF boundary (control OIDs, attribute descriptions), and empirically matched to slapd on the schema boundary: slaptest against OpenLDAP 2.6.10 (2026-08-03) accepted attributetype directives with 01.2.3.4.5, 1.02.3, and bare 1. Tightening toward RFC 4512 would reject schema files slapd loads. Raised as a finding in PR #63's adversarial review and surfaced there for a ruling; ruled working-as-intended on the probe evidence. These tests turn that ruling into something that fails the build if someone later "fixes" the grammar without re-probing slapd. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
joshmakestuff
added a commit
that referenced
this pull request
Aug 4, 2026
) IsNumericOid deliberately implements RFC 2849's looser ldap-oid grammar (leading-zero arcs, single-arc OIDs) rather than RFC 4512's numericoid. That is spec-correct on every LDIF boundary (control OIDs, attribute descriptions), and empirically matched to slapd on the schema boundary: slaptest against OpenLDAP 2.6.10 (2026-08-03) accepted attributetype directives with 01.2.3.4.5, 1.02.3, and bare 1. Tightening toward RFC 4512 would reject schema files slapd loads. Raised as a finding in PR #63's adversarial review and surfaced there for a ruling; ruled working-as-intended on the probe evidence. These tests turn that ruling into something that fails the build if someone later "fixes" the grammar without re-probing slapd.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns the
IsNumericOidquestion surfaced in #63's adversarial review into a build-failable decision, per the maintainer's ruling.IsNumericOiddeliberately implements RFC 2849's looserldap-oidgrammar (leading-zero arcs, single-arc OIDs) rather than RFC 4512'snumericoid:ldap-oid = 1*DIGIT 0*1("." ldap-oid)allows exactly these shapes.attributetypedirectives with01.2.3.4.5,1.02.3, and bare1. Tightening toward RFC 4512 would reject schema files slapd loads, inverting the tolerant-reader / slapd-compatibility invariant.Changes: one clarifying doc comment on
IsNumericOidrecording the decision and the probe, a theory inSchemaParserTestspinning all three probed OID shapes through schema parsing, and oneAttributeDescriptionTests.IsValidrow for the 2849 side. No product behavior change; suite green (417 passed).