Quantcast
Channel: Zimbra Forums
Viewing all articles
Browse latest Browse all 1129

Administrators • Re: [10.0.5 FOSS] iCal event with ORGANIZER property with null address cannot be added via DAV

$
0
0
For the second bug, where the calendar item cannot be added via DAV, I believe the problem starts in the logic in CalendarCollection.adjustOrganizer():

Code:

        ZOrganizer org = invite.getOrganizer();        String origOrganizerAddr = null;        // if ORGANIZER field is unset, set the field value with authUser's email addr.        if (org == null) {            org = new ZOrganizer(ctxt.getAuthAccount().getName(), null);            invite.setOrganizer(org);            invite.setIsOrganizer(true);        } else {            // iCal may use alias for organizer address. Rewrite that to primary address            origOrganizerAddr = org.getAddress();            Account acct = Provisioning.getInstance().get(AccountBy.name, origOrganizerAddr);            if (acct != null) {                String newAddr = acct.getName();                if (!origOrganizerAddr.equals(newAddr)) {                    org.setAddress(newAddr);                    invite.setIsOrganizer(acct);                }            }        }
Here I think the simplest fix is to not do the get() lookup when the origOrganizerAddr is null, changing line 325 to:

Code:

            Account acct = (origOrganizerAddr == null) ? null : Provisioning.getInstance().get(AccountBy.name, origOrganizerAddr);
It would probably be wise for LdapProvisioning.fixupAccountName() to more gracefully handle null arguments.

Statistics: Posted by jered — Tue Jan 02, 2024 7:57 pm



Viewing all articles
Browse latest Browse all 1129

Trending Articles