Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-4590

Use JSON.parse instead of eval on client side javascript

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.6, 1.7.2, 1.8.0, 2.0.0
    • 1.7.3, 1.9.0
    • monitor

    Description

      Right now we rely on "eval" to decode json results in the monitor display:

      vis.js

      function handleNewData() {
        if (xmlhttp.readyState!=4) {
          return;
        }
        if (xmlhttp.status!=200 || xmlhttp.responseText==null) {
          xmlReturned = true;
          return;
        }
        var newstats = eval('(' + xmlhttp.responseText + ')');
      

      We should instead use JSON.parse

      Attachments

        Activity

          People

            ctubbsii Christopher Tubbs
            busbey Sean Busbey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h