OhMyBug

input/serialization

Guard And Consumer Normalise Differently

#77rare28 sightingsfirst seen August 2026

What goes wrong

Two pieces of code that read the same value and must agree — a validator and the code that uses the value, a client-side length check and the server's count, a health probe and the program — clean it up differently (trim or not, lowercase or not, characters versus bytes), so one accepts a value the other treats as missing, different or too long.

Example

The client counts a display name in characters and accepts it; the server counts bytes and rejects the same name because it contains emoji.

Not to be confused with

Each reader is consistent with itself; they disagree with each other. Not one value in two spellings compared as unequal (Equivalent values compare different), and not one pipeline whose cleanup steps run in the wrong order (Normalization re-exposes forbidden text).

Discovered by

Field notes · 8