Fix JMAP: Return RFC-3339-conformant UTCDate literals in capabilities: min 0001-01-01T00:00:00Z, max 9999-12-31T23:59:59Z
This commit is contained in:
@@ -14,6 +14,7 @@ If you are upgrading from v0.16.x, replace the binary (or run `docker pull`). If
|
|||||||
## Fixed
|
## Fixed
|
||||||
- OAuth resource indicators: Accept `imap`, `smtp`, `pop3` and `sieve` as valid resource indicators for OAuth access tokens.
|
- OAuth resource indicators: Accept `imap`, `smtp`, `pop3` and `sieve` as valid resource indicators for OAuth access tokens.
|
||||||
- PostgreSQL: Incomplete channel binding implementation.
|
- PostgreSQL: Incomplete channel binding implementation.
|
||||||
|
- JMAP: Return RFC-3339-conformant UTCDate literals in capabilities: min `0001-01-01T00:00:00Z`, max `9999-12-31T23:59:59Z`.
|
||||||
- Reject invalid duration values (e.g. `1h30m`).
|
- Reject invalid duration values (e.g. `1h30m`).
|
||||||
|
|
||||||
## [0.16.12] - 2026-07-06
|
## [0.16.12] - 2026-07-06
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
use crate::config::mailstore::jmap::JmapConfig;
|
use crate::config::mailstore::jmap::JmapConfig;
|
||||||
use ahash::AHashSet;
|
use ahash::AHashSet;
|
||||||
use calcard::icalendar::ICalendarDuration;
|
use calcard::icalendar::ICalendarDuration;
|
||||||
use chrono::{DateTime, Utc};
|
|
||||||
use jmap_proto::{
|
use jmap_proto::{
|
||||||
object::{email::EmailComparator, file_node::FileNodeComparator},
|
object::{email::EmailComparator, file_node::FileNodeComparator},
|
||||||
request::capability::{
|
request::capability::{
|
||||||
@@ -84,8 +83,28 @@ impl JmapConfig {
|
|||||||
Capability::Calendars,
|
Capability::Calendars,
|
||||||
Capabilities::Calendar(CalendarCapabilities {
|
Capabilities::Calendar(CalendarCapabilities {
|
||||||
max_calendars_per_event: None,
|
max_calendars_per_event: None,
|
||||||
min_date_time: UTCDate::from_timestamp(DateTime::<Utc>::MIN_UTC.timestamp()),
|
min_date_time: UTCDate {
|
||||||
max_date_time: UTCDate::from_timestamp(DateTime::<Utc>::MAX_UTC.timestamp()),
|
year: 1,
|
||||||
|
month: 1,
|
||||||
|
day: 1,
|
||||||
|
hour: 0,
|
||||||
|
minute: 0,
|
||||||
|
second: 0,
|
||||||
|
tz_before_gmt: false,
|
||||||
|
tz_hour: 0,
|
||||||
|
tz_minute: 0,
|
||||||
|
},
|
||||||
|
max_date_time: UTCDate {
|
||||||
|
year: 9999,
|
||||||
|
month: 12,
|
||||||
|
day: 31,
|
||||||
|
hour: 23,
|
||||||
|
minute: 59,
|
||||||
|
second: 59,
|
||||||
|
tz_before_gmt: false,
|
||||||
|
tz_hour: 0,
|
||||||
|
tz_minute: 0,
|
||||||
|
},
|
||||||
max_expanded_query_duration: ICalendarDuration::from_seconds(86400 * 365)
|
max_expanded_query_duration: ICalendarDuration::from_seconds(86400 * 365)
|
||||||
.to_string(),
|
.to_string(),
|
||||||
max_participants_per_event: bp
|
max_participants_per_event: bp
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ pub async fn test(test: &TestServer) {
|
|||||||
"urn:ietf:params:jmap:calendars": {
|
"urn:ietf:params:jmap:calendars": {
|
||||||
"maxCalendarsPerEvent": null,
|
"maxCalendarsPerEvent": null,
|
||||||
"minDateTime": "0001-01-01T00:00:00Z",
|
"minDateTime": "0001-01-01T00:00:00Z",
|
||||||
"maxDateTime": "65534-12-31T23:59:59Z",
|
"maxDateTime": "9999-12-31T23:59:59Z",
|
||||||
"maxExpandedQueryDuration": "P52W1D",
|
"maxExpandedQueryDuration": "P52W1D",
|
||||||
"maxParticipantsPerEvent": 20,
|
"maxParticipantsPerEvent": 20,
|
||||||
"mayCreateCalendar": true
|
"mayCreateCalendar": true
|
||||||
|
|||||||
Reference in New Issue
Block a user