[SERVER-597] Validate strings to prevent embedded nulls Created: 02/Feb/10 Updated: 06/Oct/12 Resolved: 12/Mar/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kent Beck | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
I can successfully insert a string value containing a null, which confuses at least the Java driver on retrieval. I would appreciate validation on insertion to prevent the data getting into the database, although I can imagine there are legitimate reasons for nulls in strings. |
| Comments |
| Comment by Arkadiy Kukarkin [ 05/Oct/12 ] |
|
The behavior that I see is that inserting a string containing U+0000, at least from the perl driver, is interpreted as a binary object and is stored as BinData(2,"QQAAAGh0dHA6L..."), which is almost certainly not the desired behavior, given that other unicode strings are stored as normal. |
| Comment by Eliot Horowitz (Inactive) [ 02/Feb/10 ] |
|
utf-8 is allowed to contain a null. |