Skip to content

Enforce 16-char hex digest length and case-insensitive comparison for IFDEQ/IFDNE#14502

Merged
sundb merged 4 commits intoredis:unstablefrom
sundb:fix-cas
Nov 3, 2025
Merged

Enforce 16-char hex digest length and case-insensitive comparison for IFDEQ/IFDNE#14502
sundb merged 4 commits intoredis:unstablefrom
sundb:fix-cas

Conversation

@sundb
Copy link
Collaborator

@sundb sundb commented Nov 3, 2025

Fix #14496

This PR makes the following changes:

  • DIGEST: Always return 16 hex characters with leading zeros
    Example: "00006c38adf31777" instead of "6c38adf31777"

  • IFDEQ/IFDNE: Validate the digest must be exactly 16 characters

  • IFDEQ/IFDNE: Use strcasecmp for case-insensitive hex comparison
    Both uppercase and lowercase hex digits now work identically

…acters`

Co-authored-by: Yuan Wang <yuan.wang@redis.com>
@minchopaskal
Copy link
Collaborator

LGTM

@sundb sundb merged commit e436a0e into redis:unstable Nov 3, 2025
19 checks passed
@mgravell
Copy link
Contributor

mgravell commented Nov 3, 2025

I have validated against the PR branch (ironically at the same time it was being merged into unstable); seems good

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.

[BUG] DIGEST/IFDEQ/IFDNE are unusually opinionated about leading zeros and case

4 participants