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

BSON cuts off strings at \x00

    XMLWordPrintable

    Details

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

      Description

      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" }

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: