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

possible to create design docs/views with name containing HTML/JS code, Client-side error occurred trying to delete ddoc

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0-beta
    • None
    • ns_server
    • Security Level: Public
    • None

    Description

      step:
      1.created ddoc and view with the same names, inserted following code:
      <!DOCTYPE html>
      <html>
      <head>
      <script type="text/javascript">
      function myFunction()

      { alert("I am an alert box!"); }

      </script>
      </head>
      <body>

      <input type="button" onclick="myFunction()" value="Show alert box" />

      </body>
      </html>

      2. try to delete created ddoc
      result:

      redirect on the page home page and error is in the log:

      Client-side error-report for user "Administrator" on node 'ns_1@127.0.0.1':
      User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5
      Got unhandled error: Uncaught ReferenceError: myFunction is not defined
      At: http://10.5.2.16:8091/index.html#deleteDDoc=&sec=views:1
      Backtrace:
      Function: collectBacktraceViaCaller
      Args:

      ---------
      Function: appOnError
      Args:
      "Uncaught ReferenceError: myFunction is not defined"
      "http://10.5.2.16:8091/index.html#deleteDDoc=&sec=views"
      1
      ---------

      Attachments

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

        Activity

          People

            pavel Pavel Blagodov
            andreibaranouski Andrei Baranouski
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty