[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: |
|
||||||||||||||||
| 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: |
| Comment by Githook User [ 12/Jul/16 ] |
|
Author: {u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}Message: |
| Comment by Jeremy Mikola [ 12/Jul/16 ] |