Enforce 16-char hex digest length and case-insensitive comparison for IFDEQ/IFDNE by sundb · Pull Request #14502 · redis/redis

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@sundb

Copy link Copy Markdown

Collaborator

@sundb sundb commented

Nov 3, 2025

edited

Loading

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 Copy Markdown

Collaborator

LGTM

@sundb sundb merged commit e436a0e into redis:unstable

Nov 3, 2025

19 checks passed

@mgravell

Copy link Copy Markdown

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

sundb reacted with laugh emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ShooterIT ShooterIT ShooterIT approved these changes

@minchopaskal minchopaskal minchopaskal approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

4 participants

@sundb @minchopaskal @mgravell @ShooterIT