Skip to content

Conversation

@koral--
Copy link

@koral-- koral-- commented Oct 18, 2025

Previously, the validator would subtract all Unicode variation selectors (\uFE0F, \uFE0E) from a string's total length. This allowed for a string to contain a potentially infinite number of these characters while still passing a max length validation. For example, a string like "test\uFE0F\uFE0F\uFE0F..." could easily bypass a max: 4 check.

Variation selectors are now only discounted from the length if they directly follow a base character they are modifying. If they appear at the start of a string or in a sequence, they are correctly counted towards the total length.

References:

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)

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