Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3E89619DB6 for ; Tue, 5 Apr 2016 13:39:26 +0000 (UTC) Received: (qmail 81178 invoked by uid 500); 5 Apr 2016 13:39:26 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 81152 invoked by uid 500); 5 Apr 2016 13:39:25 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 81078 invoked by uid 99); 5 Apr 2016 13:39:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2016 13:39:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8E45C2C1F69 for ; Tue, 5 Apr 2016 13:39:25 +0000 (UTC) Date: Tue, 5 Apr 2016 13:39:25 +0000 (UTC) From: "Coltrey Mather (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-11501) StressGraph creates invalid JSON in cases when control characters are placed on the command-line MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Coltrey Mather updated CASSANDRA-11501: --------------------------------------- Priority: Minor (was: Major) > StressGraph creates invalid JSON in cases when control characters are placed on the command-line > ------------------------------------------------------------------------------------------------ > > Key: CASSANDRA-11501 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11501 > Project: Cassandra > Issue Type: Bug > Components: Tools > Reporter: Coltrey Mather > Priority: Minor > > Several cases in tools/stress/src/org/apache/cassandra/stress/StressGraph.java use JSONObject.put (inherited from Map) without escaping the input. I encountered this when using -graph on windows and using a windows file path (such as C:\path). In this instance the backslash was un-escaped and resulted in invalid JSON placed in the output html/javascript, which caused the page not to render. There are other cases in this file when input is not escaped as well. > All values should be escaped (using JSONObject.escape(), for example) before being put into the Map. > ref: https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blob;f=tools/stress/src/org/apache/cassandra/stress/StressGraph.java;h=ebaa0aecdb2db68485960013d4b6124c57fe1ac4;hb=HEAD -- This message was sent by Atlassian JIRA (v6.3.4#6332)