Skip to content

User descriptions added after an event keep the email address when private information removal is on #2693

Open

Description

@ejsmith

When a project has Automatically remove user identifiable information turned on, the event pipeline clears the email address from a user description sent with the event. A description added later through the user-description endpoint skips that step and is saved with the email address as submitted.

Where

Steps to reproduce

  1. In a project, turn on Automatically remove user identifiable information.
  2. Submit an event with a reference id, e.g. "reference_id": "abc123", and no user description.
  3. POST /api/v2/events/by-ref/abc123/user-description with {"email_address": "someone@example.com", "description": "It crashed"}.
  4. After the user-descriptions job runs, open the event. The user description shows someone@example.com.

Submitting the same description inside the event in step 2 stores it without the email.

Expected

The email address is dropped from late user descriptions the same way it is for descriptions sent with the event.

Suggested fix

In EventHandler.Handle(SetEventUserDescription), where the project is already loaded, set EmailAddress to null before queuing when project.Configuration.Settings.GetBoolean(SettingsDictionary.KnownKeys.IncludePrivateInformation, true) is false. Dropping it before it reaches the queue also keeps it out of Redis. Alternatively, load the project in the job and apply the same check there. Add a test for the late-description path with the setting turned off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions