Skip to content

fix(turba): harden contacts search field mapping for ActiveSync#60

Merged
TDannhauer merged 2 commits into
FRAMEWORK_6_0from
fix/activesync-search-fields
Jun 19, 2026
Merged

fix(turba): harden contacts search field mapping for ActiveSync#60
TDannhauer merged 2 commits into
FRAMEWORK_6_0from
fix/activesync-search-fields

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Fix Turba_Api::search() when defaulting address book sources leaves a nested fields structure
  • Skip non-string entries in per-source search field lists (prevents PHP 8 TypeError)

Motivation

ActiveSync ResolveRecipients calls contacts/search with per-source field maps. When all configured sources are filtered out, Turba assigned the entire keyed fields array to the default source. That produced nested arrays and $criteria[$field] crashes (Cannot access offset of type array on array).

Changes

  • When falling back to the default address book, copy the first source's field list instead of the whole keyed map when appropriate
  • Guard the search criteria loop with is_string($field)

Test plan

  • ActiveSync ResolveRecipients while composing a meeting invite on iOS (no Turba TypeError in horde.log)
  • Turba contact search in web UI still returns expected results
  • Empty/invalid source list falls back to default address book search

Avoid nesting source-keyed field lists when defaulting the search
source, and skip non-string field names when building criteria.
@TDannhauer TDannhauer requested a review from ralflang June 18, 2026 15:15
@TDannhauer TDannhauer merged commit bcd0513 into FRAMEWORK_6_0 Jun 19, 2026
0 of 6 checks passed
@TDannhauer TDannhauer deleted the fix/activesync-search-fields branch June 19, 2026 10:07
ralflang added a commit that referenced this pull request Jun 30, 2026
Release version 5.0.0

chore: update CI
Merge pull request #60 from horde/fix/activesync-search-fields
docs(api): explain fields-shape fallback in search()
fix(turba): harden contacts search field mapping for ActiveSync
refactor(session): drop $_SESSION read for has_share
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