Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-8483

"contains" Liquid operator always returns true when applied to strings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.14.0 GA
    • 2.11.3 GA
    • Gateway
    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • +
    • Hide

      In any policy that renders liquid, use the following snippet:

      {% if "abcdef" contains "wxyz" %}yes{% else %}no{% endif %}
      

      and verify it returns yes while we would be expecting no

      Show
      In any policy that renders liquid, use the following snippet: {% if "abcdef" contains "wxyz" %}yes{% else %}no{% endif %} and verify it returns yes while we would be expecting no

      When the "contains" operator is applied to strings, it always returns true, as in the example included in the steps to reproduce.

            Unassigned Unassigned
            rhn-support-sillumin Samuele Illuminati (Inactive)
            Marian Ganisin Marian Ganisin (Inactive)
            Samuele Illuminati Samuele Illuminati (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: