Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2884 Update JMAP implementation to conform to RFC 8620/8621
  3. JAMES-3450

Email/query reject Filter object with both FilterOperator and FilterCondition

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      According to JMAP spec: https://jmap.io/spec-core.html#changes section 5.5, a filter object in Email/query can either be an array of FilterOperator or FilterCondition.

      Currently we are allowing the request to have properties from both types. This could lead to unexpected result when querying Email.  For example:

       

      {
        "using": [
          "urn:ietf:params:jmap:core",
          "urn:ietf:params:jmap:mail"],
        "methodCalls": [[
          "Email/query", {
            "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
            "filter": {
              "inMailbox": "1",
              "operator": "AND",
                "conditions": [
                  { "hasKeyword": "custom" }, { "hasKeyword": "another_custom" }
                ]
            }
          }, "c1"]
        ]
      }
      

      Email/query will ignore the inMailbox condition in  the request above.

      DoD

      Integration tests to show that Email/query only accept an array of FilterOperator or FilterCondition in their respective correct structure.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dlkhuat Lan Khuat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: