[CDRIVER-1374] Accept uppercase hex characters in bson_oid_is_valid() Created: 12/Jul/16  Updated: 10/Aug/16  Resolved: 12/Jul/16

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: 1.3.5
Fix Version/s: 1.4.0

Type: Improvement Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by PHPC-736 Remove zend_str_tolower_dup() in Obje... Closed
Related
related to PHPC-620 ObjectID only supports lower case hex... Closed

 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.



 Comments   
Comment by Githook User [ 15/Jul/16 ]

Author:

{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}

Message: CDRIVER-1374: Fix strcasecmp() usage in test case (#169)
Branch: master
https://github.com/mongodb/libbson/commit/bdc3c9fee25a1283e469cb8e3c4c27ca9650c6ee

Comment by Githook User [ 12/Jul/16 ]

Author:

{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}

Message: CDRIVER-1374: Accept uppercase hex characters in bson_oid_is_valid() (#166)
Branch: master
https://github.com/mongodb/libbson/commit/e76a3598b9c3d7403e61cf53f71f496bfc7d929e

Comment by Jeremy Mikola [ 12/Jul/16 ]

https://github.com/mongodb/libbson/pull/166

Generated at Wed Feb 07 21:12:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.