Skip to content

fix(activesync): skip GAL contacts calls when Turba is absent#202

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/activesync-gal-without-turba
Jul 21, 2026
Merged

fix(activesync): skip GAL contacts calls when Turba is absent#202
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/activesync-gal-without-turba

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Stop ActiveSync from calling contacts/getGalUid (and related contacts APIs) when no contacts provider such as Turba is installed.
  • Add unit coverage for the no-Turba path.

Motivation

On mail-only Horde installs, IMP still registers contacts/favouriteRecipients. That makes $registry->contacts succeed via listAPIs(), but contacts/getGalUid is not registered. ActiveSync then logs:

The method "contacts/getGalUid" is not defined in the Horde Registry.

This can happen even when the client has contacts sync disabled (e.g. Gmail), because ResolveRecipients / GAL helpers still probe the GAL.

Changes

  • contacts_getGal(): check hasMethod('contacts/getGalUid') before calling; cache with isset.
  • contacts_search() / resolveRecipient(): return empty results when hasInterface('contacts') is false.
  • New unit tests in ConnectorContactsGetGalTest.

Test plan

  • Unit tests: ConnectorContactsGetGalTest
  • ActiveSync mail sync without Turba: no contacts/getGalUid ERR in logs
  • With Turba + GAL configured: GAL / ResolveRecipients still work

IMP advertises contacts/favouriteRecipients, so listAPIs() includes
"contacts" even without a full contacts provider. Guard getGalUid,
search, and ResolveRecipients so mail-only ActiveSync installs do not
throw Horde_Exception.

@ralflang ralflang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. Test for api providers rather than apps.

@ralflang
ralflang merged commit 833a374 into FRAMEWORK_6_0 Jul 21, 2026
1 check failed
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.

2 participants