Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-1490

Incorrect decoding when constructing fiql query

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.12
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      The incoming org.apache.cxf.jaxrs.ext.search.PrimitiveStatement#value value is already decoded in org.apache.syncope.core.persistence.api.search.SearchCondVisitor#visitPrimitive.
      Thus, the useless logic that does decoding should be removed.
      Otherwise, it leads to incorrect behavior: e.g. when special chars present it the property values.

      For example, I have user with "phone" attribute and value of this attribute is "+1234556789112"
      After double decoding, I'll have the " 1234556789112" instead of the original value.

      Example of search request:

      String fiqlQuery = SyncopeClient.getUserSearchConditionBuilder()
                      .is("phone").equalTo("+1234556789112")
                      .query();
      AnyQuery anyQuery = new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM).fiql(fiqlQuery).build();
              PagedResult<UserTO> matchingUsers = userService.search(anyQuery);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                DmitriyB. Dmitriy B.
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m