fix: Strip every string in AbstractMISP

fix #546
pull/562/head
Raphaël Vinot 2020-03-24 14:34:24 +01:00
parent c6656a1a2e
commit b5b40ae2c5
3 changed files with 4 additions and 2 deletions

View File

@ -185,6 +185,8 @@ class AbstractMISP(MutableMapping, MISPFileCache, metaclass=ABCMeta):
continue
elif isinstance(val, list) and len(val) == 0:
continue
elif isinstance(val, str):
val = val.strip()
if attribute == 'timestamp':
if not self.__force_timestamps and is_edited:
# In order to be accepted by MISP, the timestamp of an object

View File

@ -2631,7 +2631,7 @@
"uuid": "5a3d0143-c300-4118-8afe-4a2d950d210f"
}
],
"comment": "Win32/Sednit.AX\t",
"comment": "Win32/Sednit.AX",
"deleted": false,
"description": "File object describing a file with meta-information",
"distribution": "5",

View File

@ -2634,7 +2634,7 @@
"uuid": "5a3d0143-c300-4118-8afe-4a2d950d210f"
}
],
"comment": "Win32/Sednit.AX\t",
"comment": "Win32/Sednit.AX",
"deleted": false,
"description": "File object describing a file with meta-information",
"distribution": "5",