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

XDCR UI passing in "null" string for empty fields by default

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.0.0
    • Cheshire-Cat
    • UI
    • None
    • Untriaged
    • 1
    • Unknown

    Description

      When entering a remote cluster reference, and entering just the SSL information without password as it should, UI is passing a value of "null" to XDCR in the HTML form for those fields that were never touched.

      ND: form:
      map[certificate:[-----BEGIN CERTIFICATE-----
      <redacted>
      -----END CERTIFICATE-----] clientCertificate:[null] clientKey:[null] demandEncryption:[true] encryptionType:[full] hostname:[_couchbases._tcp.7cb51b5b-d9cd-410d-9cc7-1be93e2f31d9.dp.cloud.couchbase.com:8091] name:[cloud] password:[null] username:[]]
      

      XDCR parses the HTML form here:
      https://github.com/couchbase/goxdcr/blob/8f32b2abcb06a804691090a9227638710935e7cc/replication_manager/msg_utils.go#L304

      The correct behavior of all those "null" strings should mirror that of "username", which is empty.

      From the reproduced video, it seems that once a text field has text in it, and then removed, then the form is returning the correct "empty" string, which is the correct expectations. However, by default, those fields are returning "null", which is incorrect.

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-41041
          # Subject Branch Project Status CR V

          Activity

            People

              pavel Pavel Blagodov
              neil.huang Neil Huang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty