Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1177

BSON cuts off strings at \x00

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell

      The bson parser uses strlen, not the length field, to get the length of the string. Thus, if you insert a valid UTF8 string like: "y\x00z", it will return "y".

      > db.foo.insert(

      {x:"y\x00z"}

      )
      > db.foo.find()

      { "_id" : ObjectId("4c0515f068c88adddc836fc1"), "x" : "y" }

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            kristina Kristina Chodorow (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: