You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2016/08/27 18:35:21 UTC

[jira] [Resolved] (CASSANDRA-12544) Portability Flaw: Locale Dependent Comparison

     [ https://issues.apache.org/jira/browse/CASSANDRA-12544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Brosius resolved CASSANDRA-12544.
--------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.10

commit af4ebfffcfad203563c8eeadf68b2c3b0ecf2f1c

table meta data is always english, so Locale.ENGLISH is fine

> Portability Flaw: Locale Dependent Comparison
> ---------------------------------------------
>
>                 Key: CASSANDRA-12544
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12544
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Eduardo Aguinaga
>            Assignee: Dave Brosius
>             Fix For: 3.10
>
>
> 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 LegacySchemaMigrator.java on line 286 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.
> {code:java}
> LegacySchemaMigrator.java, lines 286-289:
> 286 boolean isSuper = "super".equals(tableRow.getString("type").toLowerCase());
> 287 boolean isDense = tableRow.has("is_dense")
> 288                 ? tableRow.getBoolean("is_dense")
> 289                 : calculateIsDense(rawComparator, columnRows);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)