edgeport - v1.0.3
    Preparing search index...

    Function escapeDN

    • Escapes a single DN attribute value per RFC 4514 (section 2.4).

      Escapes a leading # or leading/trailing space, plus the special characters ,, +, ", \, <, >, ;, and = anywhere in the value, by prefixing each with a backslash. Use when composing a DN component from untrusted input, e.g. `uid=${escapeDN(uid)},${base}`.

      Parameters

      • value: string

        The raw attribute value (one RDN component value, not a whole DN).

      Returns string

      The escaped value.

      1.0.2

      const dn = `cn=${escapeDN('Doe, John')},dc=example,dc=org`; // cn=Doe\, John,...