You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Torsten Römer (JIRA)" <ji...@apache.org> on 2016/02/08 12:36:39 UTC

[jira] [Updated] (CXF-6769) Underscores in values of FIQL search expressions are incorrectly escaped

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

Torsten Römer updated CXF-6769:
-------------------------------
    Description: 
We are basically "just" using FIQLParser and SQLPrinterVisitor like this:

final FiqlParser<SearchBean> fiqlParser = new FiqlParser<>(SearchBean.class);
final SearchCondition<SearchBean> searchCondition = fiqlParser.parse(search);
final SQLPrinterVisitor<SearchBean> visitor = new SQLPrinterVisitor<SearchBean>(table);
        searchCondition.accept(visitor);
final String sql = visitor.getQuery();

A search expression like this:

text==VAL_UE

yields an SQL query like this:

SELECT * FROM some_table WHERE text = 'VAL\\_UE'

If the table contains a row with text "VAL_UE", the query returns no results because the underscore in the value was escaped.

  was:
We are basically "just" using FIQLParser and SQLPrinterVisitor like this:

final FiqlParser<SearchBean> fiqlParser = new FiqlParser<>(SearchBean.class);
final SearchCondition<SearchBean> searchCondition = fiqlParser.parse(search);
final SQLPrinterVisitor<SearchBean> visitor = new SQLPrinterVisitor<SearchBean>(table);
        searchCondition.accept(visitor);
final String sql = visitor.getQuery();

A search expression like this:

text==VAL_UE

yields an SQL query like this:

SELECT * FROM some_table WHERE text = 'VAL\_UE'

If the table contains a row with text "VAL_UE", the query returns no results because the underscore in the value was escaped.


> Underscores in values of FIQL search expressions are incorrectly escaped
> ------------------------------------------------------------------------
>
>                 Key: CXF-6769
>                 URL: https://issues.apache.org/jira/browse/CXF-6769
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.1.2
>         Environment: Webapp deployed to WildFly 10
>            Reporter: Torsten Römer
>            Priority: Minor
>
> We are basically "just" using FIQLParser and SQLPrinterVisitor like this:
> final FiqlParser<SearchBean> fiqlParser = new FiqlParser<>(SearchBean.class);
> final SearchCondition<SearchBean> searchCondition = fiqlParser.parse(search);
> final SQLPrinterVisitor<SearchBean> visitor = new SQLPrinterVisitor<SearchBean>(table);
>         searchCondition.accept(visitor);
> final String sql = visitor.getQuery();
> A search expression like this:
> text==VAL_UE
> yields an SQL query like this:
> SELECT * FROM some_table WHERE text = 'VAL\\_UE'
> If the table contains a row with text "VAL_UE", the query returns no results because the underscore in the value was escaped.



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