[JAVA-891] Document fields accept NULL characters Created: 19/Jul/13 Updated: 31/Mar/15 Resolved: 02/Aug/13 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON |
| Affects Version/s: | 2.11.2 |
| Fix Version/s: | 2.11.3, 3.0.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ross Lawley | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
new BasicDBObject("foo\0bar","baz") doesn't have a valid document field name and should throw a IllegalArgumentException like fields names containing a dot. |
| Comments |
| Comment by Jeffrey Yemin [ 31/Mar/15 ] |
|
Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released. |
| Comment by Jeffrey Yemin [ 06/Jan/14 ] |
|
It'll be needed in both places. Please create a new issue in the support project, and then we can link them. Thanks, |
| Comment by Sam Perman [ 06/Jan/14 ] |
|
Thanks... I filed We have a support contract so let me know if I should move it to our support project. This isn't currently breaking production but is blocking a release of the upgraded driver. |
| Comment by Jeffrey Yemin [ 06/Jan/14 ] |
|
Sorry, I responded too quickly. I think you're right. The change was too aggressive. The intention was to catch additional use of cstrings, like in namespaces, etc, but all strings are affected. Would you like to report a new bug? I don't want to re-open one that's already been released. Please indicate the urgency for you as well. Is this breaking a production application, for example? |
| Comment by Sam Perman [ 06/Jan/14 ] |
|
It used to work though... this change (linked above) is where values no longer could include null characters, as far as I can tell: https://github.com/mongodb/mongo-java-driver/commit/5798e1b73cf801b898d71c81fd42f8437faaf267 |
| Comment by Jeffrey Yemin [ 06/Jan/14 ] |
|
This is for keys, not values. Keys can't contain NULL because BSON does not support it. |
| Comment by Sam Perman [ 06/Jan/14 ] |
|
Why is the null character not allowed in field values? |
| Comment by auto [ 12/Sep/13 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by auto [ 12/Sep/13 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by auto [ 12/Sep/13 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Ensure document keys can't contain NULL character ( |
| Comment by Jeffrey Yemin [ 02/Aug/13 ] |
|
Fixed in both branches |
| Comment by auto [ 02/Aug/13 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by auto [ 02/Aug/13 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by auto [ 02/Aug/13 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by auto [ 19/Jul/13 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Merge pull request #129 from rozza/ Ensure document keys can't contain NULL character ( |
| Comment by auto [ 19/Jul/13 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Merge pull request #129 from rozza/ Ensure document keys can't contain NULL character ( |
| Comment by auto [ 19/Jul/13 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Ensure document keys can't contain NULL character ( |