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

Type is not used when generating alert id #457

Closed
srilumpa opened this issue Jan 30, 2018 · 1 comment
Closed

Type is not used when generating alert id #457

srilumpa opened this issue Jan 30, 2018 · 1 comment
Assignees
Milestone

Comments

@srilumpa
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) Debian
TheHive version / git hash 3.0.3-1
Package Type DEB

Problem Description

Documentation says that an alert is uniquely identified with the tuple (type ; source ; sourceRef) (https://github.com/TheHive-Project/TheHiveDocs/blob/master/api/alert.md#create-an-alert). It seems that the type is ignored when generating the alert id.

Steps to Reproduce

  1. Create a dummy alert with the following parameters: {"type":"test", source":"test", "sourceRef": "test", ...} (the first alert will be created)
  2. Try to create a new alert by changing only the type, it will fail saying that there is a conflict version as the document already exists and it will serve the previously created alert
@nadouani
Copy link
Contributor

Nice fail :)

Well this once needs a migration to fix all the existing alerts, because the alert's ID is used to check to existence of an alert

@nadouani nadouani added the bug label Jan 30, 2018
@To-om To-om added this to the 3.0.4 milestone Jan 31, 2018
To-om added a commit that referenced this issue Feb 2, 2018
To-om added a commit that referenced this issue Feb 2, 2018
@To-om To-om closed this as completed Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants