Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 26B7E200BC8 for ; Sat, 15 Oct 2016 18:26:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 258B8160AF1; Sat, 15 Oct 2016 16:26:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6BE6F160AF4 for ; Sat, 15 Oct 2016 18:26:22 +0200 (CEST) Received: (qmail 50922 invoked by uid 500); 15 Oct 2016 16:26:21 -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 50867 invoked by uid 99); 15 Oct 2016 16:26:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Oct 2016 16:26:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2A8002C4C74 for ; Sat, 15 Oct 2016 16:26:21 +0000 (UTC) Date: Sat, 15 Oct 2016 16:26:21 +0000 (UTC) From: "Amit Deshpande (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-12543) Portability Flaw: Locale Dependent Comparison MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 15 Oct 2016 16:26:23 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15578383#comment-15578383 ] Amit Deshpande commented on CASSANDRA-12543: -------------------------------------------- https://github.com/apache/cassandra/pull/76/files ready with fix > Portability Flaw: Locale Dependent Comparison > --------------------------------------------- > > Key: CASSANDRA-12543 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12543 > Project: Cassandra > Issue Type: Sub-task > Reporter: Eduardo Aguinaga > Priority: Trivial > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 of the Cassandra source code. The analysis included an automated analysis using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools Understand v4. The results of that analysis includes the issue below. > Issue: > In the file ThriftConversion.java on lines 197 and 679 there is a portability problem with the call to toLowerCase() because it has different locales which may lead to unexpected output. This may also circumvent custom validation routines. > ThriftConversion.java, lines 197-202: > {code:java} > 197 switch (thriftColumnType.toLowerCase()) > 198 { > 199 case "standard": return false; > 200 case "super": return true; > 201 default: throw new org.apache.cassandra.exceptions.InvalidRequestException("Invalid column type " + thriftColumnType); > 202 } > {code} > ThriftConversion.java, lines 679-691: > {code:java} > 679 switch (caching.toUpperCase()) > 680 { > 681 case "ALL": > 682 return CachingParams.CACHE_EVERYTHING; > 683 case "ROWS_ONLY": > 684 return new CachingParams(false, Integer.MAX_VALUE); > 685 case "KEYS_ONLY": > 686 return CachingParams.CACHE_KEYS; > 687 case "NONE": > 688 return CachingParams.CACHE_NOTHING; > 689 default: > 690 throw new ConfigurationException(String.format("Invalid value %s for caching parameter", caching)); > 691 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)