Skip to content

[NFR]: Match redacted keys by word parts, and add redact.unmask #67

Closed

Description

@niden

The redactor masks a key only when the whole key name matches. Keys such as reset_token, access_token, secret_key and db_password show their values unless the developer adds each name to redact.mask. Real config names seldom match one of the default names exactly.

Proposed changes:

  • redact.mask and redact.hidden match each word part of a key. The redactor splits a key on _, -, . and camelCase, so token matches reset_token and accessToken.
  • An entry with more than one part matches parts that are next to each other. For example, card_number matches cardNumber and customer_card_number.
  • A new redact.unmask option, empty by default, fixes false positives such as primary_key. Each entry is a pattern. The pattern must match the whole key, and the match is not case-sensitive. * is the only wildcard. For example, card matches only card, card* also matches card_number, and card also matches customer_card_number.
  • hidden comes first, then unmask, then mask. A hidden key is always dropped.
  • Update the docs, DebugBarTypes and the changelog. Some values that showed before will now show ***.

Activity

  1. self-assigned this
    on Nov 5, 2026
  2. added theissue type on Nov 5, 2026
  3. niden commented on Nov 6, 2026

    @niden
    SponsorMemberAuthor

    Resolved in #68

  4. moved this from Backlog to Implemented in Phalcon v5on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

  • Status
    Implemented

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions