View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006164 | SOGo | Backend Calendar | public | 2025-12-03 09:02 | 2025-12-03 09:02 |
| Reporter | moi90 | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 3.2.10 | ||||
| Summary | 0006164: DAV event search with start date prior to INT_MIN (1901-12-13 21:45) returns no results | ||||
| Description | When performing an event search for dates prior to INT_MIN=-2,147,483,648 (1901-12-13 21:45), the search returns no results. It seems that internally, a signed int32 is used, because if I try even smaller timestamps, (e.g. -2,666,998,506 (1885-06-26)), a large enough underrun happens and results reappear. User-provided search parameters should be validated if they fit inside the datatype, and/or truncated. | ||||
| Steps To Reproduce | I used the caldav library in Python, see attached code. | ||||
| Tags | dav | ||||
|
mwe.py (811 bytes)
from caldav import DAVClient
from datetime import datetime
# %%
# Connect
client = DAVClient(
...
)
# %%
# Select calendar
calendar = client.calendar(
url=...
)
# %%
# Find events starting from prior to -INT32_MAX-1
start = datetime.fromtimestamp(-2_147_483_649)
events = calendar.search(
event=True,
start=start,
end=None,
)
assert len(events) == 0
# %%
# Find events starting from after -INT32_MAX-1
start = datetime.fromtimestamp(-2_147_483_648)
events = calendar.search(
event=True,
start=start,
end=None,
)
assert len(events) > 0
# %%
# Due to a buffer underflow issue, searching even earlier dates may return events
start = datetime.fromtimestamp(-2_666_998_506)
events = calendar.search(
event=True,
start=start,
end=None,
)
assert len(events) > 0
# %%
|
|