Conversation
ximalin
force-pushed
the
zcore-essdn-full-address
branch
2 times, most recently
from
September 11, 2026 15:26
a9aa868 to
1745d68
Compare
common_util_username_to_entryid() cuts the domain off the username before handing it to cvt_username_to_essdn(), which splits the address itself. The helper therefore sees a name with no '@' in it, and since da7de4c ("usercvt: public store support for cvt_username_to_essdn") that selects the public-store branch: /o=example/[...]/cn=2200000011000000-public.folder.root where -sender belongs. The numeric half still names the right user, so nothing fails where the EntryID is written, but cvt_essdn_to_username() checks the textual half against the mailbox it resolved and returns ecUnknownUser when the two disagree. This is the username_to_entryid callback zcore installs for iCalendar import, so it covers the organizer (PR_SENT_REPRESENTING_ENTRYID, PR_SENDER_ENTRYID) and every attendee of an appointment created over CalDAV or from the web client. The double split arrived with 14aacee ("exch: convert more sites using EAG_RCPTS to usercvt functions"), which replaced the snprintf that had composed the ESSDN in this function with a call to the shared helper and kept the caller's split in place. It has been silent from that day because da7de4c had given a name with no '@' a meaning twelve days earlier; before that the helper answered ecInvalidParam. The two other call sites in this file pass the helper a whole address. Measured with cvt_username_to_essdn() followed by cvt_essdn_to_username(): sender@example.org -> [...]-sender -> sender@example.org sender -> [...]-public.folder.root -> ecUnknownUser tests/utiltest gains the round trip for a full address and the public-store branch for a bare name, so the requirement on the caller is written down somewhere.
ximalin
force-pushed
the
zcore-essdn-full-address
branch
from
September 20, 2026 15:20
1745d68 to
e55683f
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.
zcore mints ESSDN EntryIDs that gromox itself cannot resolve back. Measured with
cvt_username_to_essdn()followed bycvt_essdn_to_username():sender@example.org.../cn=2200000011000000-sendersender@example.orgsender-- what the caller passes.../cn=2200000011000000-public.folder.rootecUnknownUserMechanism
common_util_username_to_entryid()cuts the domain off first, butcvt_username_to_essdn()splits the address itself, and a name with no@selects the public-store branch da7de4c added. The numeric half of the cn still names the right user, so nothing fails where the EntryID is written;cvt_essdn_to_username()is the reader that checks the textual half, and it answersecUnknownUser.This is the
username_to_entryidcallback zcore installs for iCalendar import (cu_ical_to_message,cu_ical_to_message2), so it covers the organizer (PR_SENT_REPRESENTING_ENTRYID,PR_SENDER_ENTRYID) and every attendee of an appointment created over CalDAV or from the web client.Where it comes from
common_util_username_to_entryid()composed the ESSDN itself with a singlesnprintf()until 14aacee replaced that with a call to the shared helper and kept the caller's split in place. da7de4c had landed twelve days earlier, so the public-store branch was already there to absorb the bare name; before it the helper answeredecInvalidParam, and the same mistake would have failed loudly. The two other call sites in this file pass the helper a whole address.Change
Hand
usernameto the helper instead oftmp_name. This also drops the earlyreturn FALSEfor a name with no@in it: the helper handles that shape deliberately, andmysql_adaptor_get_user_ids()has already accepted the name.Test
tests/utiltestgains the round trip for a full address and the public-store branch for a bare name, so the requirement on the caller is written down somewhere.make checkpasses 3/3.