You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2020/11/21 03:36:00 UTC
[jira] [Closed] (JAMES-3450) Email/query reject Filter object with
both FilterOperator and FilterCondition
[ https://issues.apache.org/jira/browse/JAMES-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Tellier closed JAMES-3450.
---------------------------------
Resolution: Fixed
https://github.com/linagora/james-project/pull/4046 solved this
> Email/query reject Filter object with both FilterOperator and FilterCondition
> -----------------------------------------------------------------------------
>
> Key: JAMES-3450
> URL: https://issues.apache.org/jira/browse/JAMES-3450
> Project: James Server
> Issue Type: Sub-task
> Reporter: Lan Khuat
> Priority: Major
>
> 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:
>
> {code:java}
> {
> "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"]
> ]
> }
> {code}
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org