In 2023 I took over Zipy's browser SDK. The engineer who built it had left, and it was running on sixty to seventy customers' live websites, recording what their visitors did.
A recording is built from two things at once. The SDK takes snapshots of the page, and it records a stream of events as they happen: clicks, scrolls, typing. Play both back together and you get the session.
Password fields were masked in the snapshot. Open a recording, look at the password box, and you see asterisks, exactly what the visitor saw. That part worked.
The events were another matter. Each input event carried the characters the visitor had actually typed. So the replay showed asterisks on the screen while the real password sat in the event data behind it.
One value, two paths
That is the shape of the bug. The same value travelled through two different capture paths, and only one of them had been thought about. Masking lived in the snapshot code. Nobody had asked the same question of the event code.
I did not write either path. But I had owned the SDK for a while by then and I had not gone looking. That is the part of this I would change.
The fix was to mask the characters at the point of capture, before the event is built. That matters more than it sounds. Once the real value is in the pipeline it exists in three places at once: in the browser's memory, on the network, and in our storage. Removing it later is damage control. Never recording it means there is nothing to control.
What a bank would want
Fixing passwords was the floor, not the ceiling.
A bank looking at a session replay tool does not only care about the password field. They do not want account numbers, balances, names, or anything else their customer typed or read to appear in a replay, even an internal one. That is a different level of confidentiality from hiding one input.
So we built a textMasking option. Switch it on and the SDK masks text content in general, rather than only the fields we had decided in advance were sensitive.
Why that one is a flag and the password fix was not
Masking a password is not a choice. It is on for everyone, always, and no reasonable customer wants it off. So that went out as a fix, not a setting.
Masking all text is a choice, and it costs something real. A replay with every word hidden is much harder to debug with, and most customers would not want that. Turning it on for everyone would have made the product worse for the people who did not need it. So it is a flag, off unless a customer asks for it.
After this, checking what we captured became a standing part of review rather than something done once. What changed for me is smaller and more practical than a principle: when I read capture code now, I go looking for the second path.