Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jmap_ical.c: reject non-integer priority value #5230

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

rsto
Copy link
Member

@rsto rsto commented Jan 22, 2025

The conditional that validates the priority property value to be in the valid range from 0..9 had an error, effectively accepting any JSON value as a valid priority value. Any non-integer JSON value resulted in priority 0 to be set.

This patch keeps accepting any JSON integer value as priority (contrary to RFC8984 requiring it to be in the 0..9 range), but now rejects any non-integer JSON value.

Fixes #5226

The conditional that validates the priority property value to
be in the valid range from 0..9 had an error, effectively
accepting any JSON value as a valid priority value. Any
non-integer JSON value resulted in priority 0 to be set.

This patch keeps accepting any JSON integer value as priority
(contrary to RFC8984 requiring it to be in the 0..9 range),
but now rejects any non-integer JSON value.

Fixes cyrusimap#5226
@rsto rsto requested a review from ksmurchison January 22, 2025 08:07
@rsto rsto merged commit a29a567 into cyrusimap:master Jan 23, 2025
1 check passed
@rsto rsto deleted the jmap_ical_accept_any_priority branch January 23, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tautology in jmap_ical.c:calendarevent_to_ical()
2 participants