PhoenixReplay.Sanitizer.Default (PhoenixReplay v0.6.2)

Copy Markdown View Source

Default PhoenixReplay.Sanitizer.

  • Replaces the value of any key whose name contains password, token, secret, api_key, private_key, credential, card_number, credit_card or one_time with "[FILTERED]". Keys are kept so recorded templates still find them.
  • In params, which include what users type into form controls, also filters keys that have cvv, cvc, csc, ssn, pin or otp as a word of their own, such as card_cvv or pinCode but not shipping. Assigns keep them: an assign named :pin or :otp_app is usually not a secret, and a filtered one can break the replay.
  • Recurses into maps, lists, tuples and structs, and compacts Ecto.Changeset and Phoenix.HTML.Form runtime metadata.

Opaque standard-library structs such as MapSet and DateTime, and URI, are kept as they are: no key in them tells a secret apart. LiveView internals that cannot be replayed never reach a sanitizer.