You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2026/10/05 07:01:42 UTC

[PR] JAMES-3536 Email/set create: reject bodyStructure and unknown properties [james-project]

chibenwa opened a new pull request, #3234:
URL: https://github.com/apache/james-project/pull/3234

   Reported downstream in https://github.com/linagora/tmail-backend/issues/2685
   
   ## Problem
   
   `Email/set` `create` silently ignored `bodyStructure` (not implemented, JAMES-3536) and any unknown property. A create with only a `bodyStructure` was accepted and stored an email with an **empty** `text/plain` body: the client was told it succeeded and the content was lost.
   
   RFC 8621 §4.6: creation attempts violating its constraints SHOULD be rejected with `invalidProperties`. RFC 8620 §5.3 defines `invalidProperties` for records containing invalid properties.
   
   ## Change
   
   - `EmailCreationRequest.validateProperties`: a create containing `bodyStructure` (alone or with `textBody`/`htmlBody`/`attachments`) is rejected with `invalidProperties`, `properties: ["bodyStructure"]`, and a description pointing to `textBody`/`htmlBody`/`attachments`.
   - Any key that is neither a supported Email creation property nor a `header:` form is rejected with `invalidProperties` listing those keys.
   - `headers` keeps its existing `invalidArguments` error (property validation runs after deserialization).
   - Spec doc note updated.
   
   Implementing `bodyStructure` itself (the full JAMES-3536) is out of scope.
   
   ## Tests
   
   New `EmailSetMethodContract` tests: `bodyStructure` only, `bodyStructure` + `htmlBody`, unknown property. Memory `EmailSetMethodTest`, `EmailSubmissionSetMethodTest`, `EmailGetMethodTest`, `EmailChangesMethodTest`, `EventSourceTest` and `WebSocketTest` pass.
   
   ---
   *Generated automatically*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-3536 Email/set create: reject bodyStructure and unknown properties [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa merged PR #3234:
URL: https://github.com/apache/james-project/pull/3234


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org