On this page8
  1. At a glance
  2. Why the default decides everything
  3. How a sensitive field is found
  4. What gets stored
  5. What it costs: fields outside the list are recorded
  6. What masking does not solve
  7. Result
  8. Hiring someone to build the whole product?

Part of my work on Andazeh. By Mohammad Javad Dastouri, full-stack and AI engineer.

Session replay records what people do on a page. Built carelessly, it also stores their passwords. This is how I prevented that.

At a glance

Area
Analytics, SEO and marketing
My role
Sole engineer: design, build, deploy and run
Built with
JavaScript, Node.js 22, PostgreSQL
Area
Analytics, SEO and marketing
My role
Sole engineer: design, build, deploy and run
Built with
JavaScript, Node.js 22, PostgreSQL

Why the default decides everything

The obvious recorder captures every key. It works on the first day, and on a password field it is a password logger with a replay UI.

Sensitive fields are masked automatically. A site that installs the script and changes nothing still gets that protection.

How a sensitive field is found

  • Field type

    every password field, without exception.

  • Field details

    the name, id, autocomplete value, label and placeholder are read together.

  • Patterns

    passwords, secrets, card numbers, security codes, social security numbers, one-time codes, PINs, IBANs, routing and account numbers.

  • Field type

    every password field, without exception.

  • Field details

    the name, id, autocomplete value, label and placeholder are read together.

  • Patterns

    passwords, secrets, card numbers, security codes, social security numbers, one-time codes, PINs, IBANs, routing and account numbers.

What gets stored

In a sensitive field, each printable key is replaced by a placeholder in the browser, so the character is never sent. Named keys such as Enter and Backspace are kept, because they describe behaviour and not content.

What it costs: fields outside the list are recorded

What masking does not solve

Result

One rule came out of this project, and I apply it elsewhere.

When a feature's naive implementation collects more than it needs, the safe configuration has to be the one you get by doing nothing.

Hiring someone to build the whole product?

Tell me about the role, or go back to the project: a complete analytics platform I designed, built and run.

Section
Analytics, SEO and marketing
Updated
November 9, 2026
Reading time
2 min read

Hiring for this kind of work?

Tell me about the role and I will reply by email.

Discuss a role with me