Skip to content

Correctly limit Algolia query length to 512 bytes#147

Merged
MattIPv4 merged 4 commits intomasterfrom
MattIPv4/fix-algolia-max-query-length
Feb 8, 2026
Merged

Correctly limit Algolia query length to 512 bytes#147
MattIPv4 merged 4 commits intomasterfrom
MattIPv4/fix-algolia-max-query-length

Conversation

@MattIPv4
Copy link
Copy Markdown
Member

@MattIPv4 MattIPv4 commented Feb 8, 2026

Type of Change

  • Routes: /libraries

What issue does this relate to?

https://cdnjs.sentry.io/issues/7249720221

What should this PR do?

Algolia's query limit is 512 bytes, not 512 characters, so this introduces TextEncoder-based logic to correctly limit the query provided to 512 bytes.

What are the acceptance criteria?

Valid query strings continue to be passed to Algolia, query strings that are too long are correctly trimmed.

@MattIPv4 MattIPv4 merged commit c0c01b4 into master Feb 8, 2026
4 checks passed
@MattIPv4 MattIPv4 deleted the MattIPv4/fix-algolia-max-query-length branch February 8, 2026 00:43
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.

1 participant