Skip to content

Fix Haversack.search only returning a single item#13

Merged
JacobHearst merged 1 commit intojamf:mainfrom
JacobHearst:bugfix/search-only-returns-single-value
Jan 14, 2026
Merged

Fix Haversack.search only returning a single item#13
JacobHearst merged 1 commit intojamf:mainfrom
JacobHearst:bugfix/search-only-returns-single-value

Conversation

@JacobHearst
Copy link
Contributor

This bug was introduced in the effort to improve HaversackEphemeralStrategy ergonomics. As of writing, those changes haven't been tagged and released so this isn't urgent.

I was unable to write a unit test for this because searches for both single and multiple items include the kSecMatchLimit (source). This means that the dictionary keys generated by the ephemeral strategy look identical (classkeyslablexamm_Limitm_Lir_Data vs classkeyslablexamm_Limitm_Lir_Data). I could, of course, change the key generation strategy but that would break unit tests for consumers of this library.

Since I couldn't write tests, I did a manual review of calls to makeSearchQuery and the other query builder functions to double check there were no other similar errors.

@JacobHearst JacobHearst merged commit adcec90 into jamf:main Jan 14, 2026
3 checks passed
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.

3 participants