icalvalue.c: validate COLOR values#7
Open
ksmurchison wants to merge 1 commit intocyrusimap:masterfrom
Open
Conversation
rsto
requested changes
Apr 3, 2026
Member
rsto
left a comment
There was a problem hiding this comment.
I don't think icalderivedvalue.c belongs in here?
Other than that, this looks sane to me. But: the next step after having fixed up this code is NOT to merge it. Instead:
- Create a cyrus-imapd branch, update its Github workflow to build and install libical using the branch of this pull request. There should be tests in that cyrus-imapd branch that fail unless libical supports COLOR validation, e.g. they should fail for the current libical cyruslibs tag. The tests should pass with this libical branch. If CI succeeds for this PR, then you know the PR uses the right libical patch and that patch does the right thing (according to the tests).
- Create a pull request on libical upstream and get it merged.
- Update the tip of the cyrusimap/libical repo to point to the latest main branch that includes the merged changes. Repeat step 1 with it.
After that, cyruslibs tags will get to get updated and some additional at Fastmail need to happen. We'll do that later.
Per RFC 7986 Section 5.9, and as updated by draft-ietf-calext-icalendar-jscalendar-extensions Section 2.2: The value is a color name taken from the set of names defined in Section 4.3 of https://www.w3.org/TR/css-color-3/ or an RGB value in six-digit hexadecimal notation, as defined in Section 4.2.1 of https://www.w3.org/TR/css-color-3/ Values are case-insensitive.
439f3e6 to
f2ccd48
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per RFC 7986 Section 5.9, and as updated by
draft-ietf-calext-icalendar-jscalendar-extensions Section 2.2:
The value is a color name taken from the set of names defined in Section 4.3 of https://www.w3.org/TR/css-color-3/
or an RGB value in six-digit hexadecimal notation, as defined in Section 4.2.1 of https://www.w3.org/TR/css-color-3/
Values are case-insensitive.