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

[Bug] Get_Case_Template broken in TheHive 4 #183

Closed
milesflo opened this issue Sep 24, 2020 · 0 comments
Closed

[Bug] Get_Case_Template broken in TheHive 4 #183

milesflo opened this issue Sep 24, 2020 · 0 comments

Comments

@milesflo
Copy link

milesflo commented Sep 24, 2020

Get_Case_Template broken in TheHive 4

Request Type

Bug

Problem Description

This line breaks the get_case_template method when targeting TheHive4

"query": And(Eq("name", name), Eq("status", "Ok"))

Error:

{
  "type":    "BadRequest",
  "message": "Property status for type org.thp.thehive.services.CaseTemplateSteps not found"
}

Steps to Reproduce

  1. add print(response.json()) to line 591 of api.py
  2. Attempt to search for an existing case using api.get_case_template("name")
  3. Observe useful error message that is hidden behind CaseTemplateException wrapper

Possible Solutions

Remove the status operator on line 581, resulting in:

req = self.url + "/api/case/template/_search"
data = {
    "query": Eq("name", name)
}
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.

2 participants