Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-5794

View parser returns JSON strings unescaped

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 2.0
    • 2.0
    • view-engine
    • Security Level: Public
    • None
    • 0.5

    Description

      Document editing is using the following url http://lh:9000/couchBase/default/_all_docs?skip=0&include_docs=true&limit=5&_=1341509643238

      it normally works except Steve has broken it on my box by uploading this:

      1. wget O -q 'http://lh:9000/couchBase/default/00000001' {"_id":"00000001","_rev":"2-00027be31890c78a0000000000000000","name":"steve \"yen\"","job":1,"$expiration":0,"$flags":0}

      And those quotes break all docs output massively:
      wget O -q 'http://lh:9000/couchBase/default/all_docs?skip=0&include_docs=true&limit=5&=1341509643238'
      {"total_rows":998000,"rows":[
      {"id":"00000001","key":"00000001","value":

      {"rev":"2-00027be31890c78a0000000000000000"}

      ,"doc":{"_id":"00000001","_rev":"2-00027be31890c78a0000000000000000","name":"steve "yen"","job":1,"$expiration":0,"$flags":0}},
      {"id":"00000002","key":"00000002","value":

      {"rev":"1-00027b84bccda3f10000000000000000"}

      ,"doc":{"_id":"00000002","_rev":"1-00027b84bccda3f10000000000000000","$expiration":0,"$flags":0}},
      {"id":"00000004","key":"00000004","value":

      {"rev":"1-00027b84bcc993a90000000000000000"}

      ,"doc":{"_id":"00000004","_rev":"1-00027b84bcc993a90000000000000000","$expiration":0,"$flags":0}},
      {"id":"00000006","key":"00000006","value":

      {"rev":"1-00027b84bcc9f7420000000000000000"}

      ,"doc":{"_id":"00000006","_rev":"1-00027b84bcc9f7420000000000000000","$expiration":0,"$flags":0}},
      {"id":"00000007","key":"00000007","value":

      {"rev":"1-00027b84bccc52730000000000000000"}

      ,"doc":{"_id":"00000007","_rev":"1-00027b84bccc52730000000000000000","$expiration":0,"$flags":0}}
      ]
      }

      As you can see quotes inside steve "yen" are not escaped properly

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            FilipeManana Filipe Manana (Inactive)
            alkondratenko Aleksey Kondratenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty