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

Accept uppercase hex characters in bson_oid_is_valid()

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.0
    • Affects Version/s: 1.3.5
    • Component/s: libbson
    • None

      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.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: