Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1374

Accept uppercase hex characters in bson_oid_is_valid()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.3.5
    • Fix Version/s: 1.4.0
    • Component/s: libbson
    • Labels:
      None

      Description

      bson_oid_is_valid() requires lowercase characters, but bson_oid_parse_hex_char() (used by bson_oid_init_from_string_unsafe) is case-insensitive.

      bson_oid_is_valid() is documented as "return true if @str can be passed to bson_oid_init_from_string()." Allowing it to accept uppercase characters satisfies this contract and would remove the need for calling code to convert their input strings to lowercase.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jmikola Jeremy Mikola
              Reporter:
              jmikola Jeremy Mikola
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: