Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Correctly handle dynamic tags without modifiers #3211

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

jkppr
Copy link
Collaborator

@jkppr jkppr commented Oct 18, 2024

The tagger analyzer was splitting dynamic tag values into individual characters when no modifiers were specified. This was due to a check for Iterables that returns True for strings and then extends the string into a list.

This PR fixes the issue by:

  • Check for Strings and append those first.
  • Handle None values
  • Explicitly converting the initial config tags to a list to prevent string iteration when adding initial tags.

This change ensures that dynamic tags are correctly handled, even without modifiers, and prevents unexpected splitting behavior. It also improves compatibility with Timesketch by ensuring all tag values are strings, and it addresses a potential TypeError by preventing None values from being added to the tag list.

closes #3206

@jkppr jkppr self-assigned this Oct 18, 2024
@jkppr jkppr requested review from tomchop and berggren and removed request for tomchop October 18, 2024 11:24
@jkppr jkppr requested review from tomchop and removed request for berggren October 18, 2024 11:27
@tomchop tomchop merged commit 742c2be into google:master Oct 18, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic tagging in tagger analyzer
2 participants