ReconInfoSec / graylog2thehive

Create alerts in The Hive from your Graylog alerts, to be turned into Hive cases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Traceback Encoding

not-batmanor opened this issue · comments

Traceback (most recent call last):
File "/home/socadmin/.local/lib/python3.10/site-packages/flask/app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
File "/home/socadmin/.local/lib/python3.10/site-packages/flask/app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/socadmin/.local/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
File "/home/socadmin/.local/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(view_args)
File "/opt/graylog2thehive/app/init.py", line 142, in create_alert_http
# description=description+"\n
"+key+":** "+json.dumps(message_flattened[key], ensure_ascii=False, encoding="utf8")+"\n"
File "/usr/lib/python3.10/json/init.py", line 234, in dumps
return cls(

Workaround:

/opt/graylog2thehive/app$ nano _ _ init_ _ .py

-- description=description+"\n**"+key+":** "+json.dumps(message_flattened[key], ensure_ascii=False, encoding="utf8")+"\n"

++ description=description+"\n**"+key+":** "+json.dumps(message_flattened[key], ensure_ascii=False)+"\n"

AND

-- description=description+"\n**"+key+":** "+json.dumps(message_flattened[key], ensure_ascii=False, encoding="utf8")+"\n"

++ description=description+"\n**"+key+":** "+json.dumps(message_flattened[key], ensure_ascii=False)+"\n"