Skip to content

[Bug]: Domain squatting "log" action behaves as "warn" (shows banner, records telemetry as warned) #161

Description

@MWG-Logan

Summary

In the domain squatting result handler in scripts/content.js, the configurable action enum (block | warn | log) is collapsed to block vs. everything-else. As a result, the log action is functionally identical to warn: it shows the orange warning banner and records every telemetry line as warned.

Affected code

scripts/content.js, domain squatting result handler (approximately lines 4130-4232):

const shouldBlock = squattingData.action === 'block' &&
                    config.enablePageBlocking !== false;

// telemetry hard-codes the non-block case to "warned":
logProtectionEvent({ action: shouldBlock ? "blocked" : "warned", /* ... */ });
sendCippReport({     action: shouldBlock ? "blocked" : "warned", /* ... */ });
chrome.runtime.sendMessage({ /* webhook */ data: { action: shouldBlock ? "blocked" : "warned" } });

if (shouldBlock) {
  await showBlockingOverlay(/* ... */);
  return;
} else if (showNotifications) {
  showWarningBanner(/* ... */);
}

There is no branch for log, so action: "log" falls through to the else if (showNotifications) branch and displays a banner, and all telemetry records "warned".

The detector side is correct and is not the problem. getActionForSeverity() in scripts/modules/domain-squatting-detector.js passes log through intact.

Reproduction

  1. Set domainSquatting.Action to log.
  2. Visit a combosquat host that matches a protected brand.
  3. Observed: orange warning banner is shown and telemetry event has action: "warned".

Expected behavior

The three states should be distinct:

  • block: blocking overlay, telemetry action: "blocked".
  • warn: warning banner shown AND telemetry recorded (action: "warned"). Warn should log.
  • log: telemetry recorded only (action: "logged"), no banner shown to the user. Log should not warn.

Evidence

Seen in a customer log where squattingDetails.action was "log" but the emitted event action was "warned" and the user saw the orange banner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions