MISP / misp-modules

Modules for expansion services, enrichment, import and export in MISP and other tools.
http://misp.github.io/misp-modules
GNU Affero General Public License v3.0
344 stars 233 forks source link

misp-modules - WARNING - MISP modules farsight_passivedns failed due to unsupported locale setting #303

Closed juju4 closed 3 years ago

juju4 commented 5 years ago

I switched recently my ansible role test to kitchen-docker and the above warning appeared when running misp-modules -t https://travis-ci.org/juju4/ansible-MISP/jobs/537309446#L8175

I tried to force LANG=C and LC_ALL in serverspec test file but it didn't help

Inside docker

$ KITCHEN_YAML=.kitchen.docker.yml kitchen exec ${suite}-${distribution}-${version//./} -c 'cat /etc/locale.conf'
-----> Execute command on default-centos-7.
       bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
       /bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
       LANG="en_US.UTF-8"

Error appears only on centos7, not ubuntu xenial or bionic

Any idea where the problem come from? code does not seem to have any locale check https://github.com/MISP/misp-modules/blob/master/misp_modules/modules/expansion/farsight_passivedns.py maybe this but LC_ALL update didn't work https://github.com/MISP/misp-modules/blob/8fc5b1fd1f683fb1313aaca8f07cd40be1ebbe02/misp_modules/modules/expansion/_dnsdb_query/dnsdb_query.py#L48

Thanks

adulau commented 3 years ago

It should be fixed in recent version. Feel free to reopen if you have any issues.