Skip to content

Exclusion filtering for DB-mode page results falls back to content for name matching #57

Description

@ergut

While reviewing #56, a gap in the exclude_tags filtering came up. In DB mode, both the text formatter and the new JSON formatter for search compare page results against the excluded name set using fullTitle or title or content as the key. If a page result has neither fullTitle nor title and its content doesn't hold the page name, the exclusion check silently fails open and the page is shown even though it should be filtered.

In practice DB-mode search returns page entries with content equal to the page title, so the chance of this actually leaking a page is low. That's why I'm filing this as low priority rather than fixing it right away.

Possible fixes when we get to it:

  • Match against page UUIDs instead of names. DB-mode results carry the page UUID, which would be more robust than string comparison.
  • Or fail closed: when exclude_tags is configured, drop DB-mode page results that have no identifiable name, similar to how markdown-mode snippets are already hidden when exclusions are active.

Whatever the fix, it should apply to both the text and JSON paths so they stay consistent.

Refs #56

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions