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/09/09 12:33:33 UTC
[PR] [FIX] ICALAttributeDTO should sanitize invalid RECURRENCE-ID [james-project]
chibenwa opened a new pull request, #3162:
URL: https://github.com/apache/james-project/pull/3162
Follow-up of #3084, reported on linagora/tmail-backend#2621.
`DateProperty` resolves its `TZID` lazily in `getValue()`, so an event carrying something like
```
RECURRENCE-ID;TZID=Invalid/Zone:20170111T090000
```
parses fine (even with `withSuppressInvalidProperties(true)`) but explodes with a `DateTimeException` when `ICALAttributeDTO.Builder.from` reads it. That exception escaped `from(...)`, was caught in `ICALToJsonAttribute.toICAL` as `ERROR Exception while converting calendar to ICAL`, and the **whole calendar was dropped** for that recipient.
#3084 guarded `DTSTAMP` only. This PR generalises `safeValue` to any `Property` and routes `optionalOf` through it, so `RECURRENCE-ID` (and `METHOD` / `SEQUENCE`) get the same treatment: the offending field is omitted with a WARN naming the property, and the rest of the calendar is still forwarded.
Tests: two new `ICALAttributeDTOTest` cases with fixtures carrying an invalid `TZID` on `DTSTAMP` and on `RECURRENCE-ID`. The `RECURRENCE-ID` one fails on master with `ZoneRulesException: Unknown time-zone ID: Invalid/Zone`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
*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] [FIX] ICALAttributeDTO should sanitize invalid RECURRENCE-ID [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa closed pull request #3162: [FIX] ICALAttributeDTO should sanitize invalid RECURRENCE-ID
URL: https://github.com/apache/james-project/pull/3162
--
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