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

Small typo in pycti/entities/opencti_stix_cyber_observable.py line 1650 #6681

Closed
sweet-mentat opened this issue Apr 12, 2024 · 0 comments
Closed
Assignees
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)

Comments

@sweet-mentat
Copy link

sweet-mentat commented Apr 12, 2024

Description

in the below code snippet, you are looking for "mime/type" in observable_data, then try to assign the value, but using the "mime_type" key.

if "payload_bin" in observable_data and "mime/type" in observable_data:
               self.add_file(
                    id=result["data"]["stixCyberObservableAdd"]["id"],
                    file_name=(
                        observable_data["x_opencti_additional_names"][0]
                        if "x_opencti_additional_names" in observable_data
                        and len(observable_data["x_opencti_additional_names"]) > 0
                        else "artifact.bin"
                    ),
                    data=base64.b64decode(observable_data["payload_bin"]),
                    mime_type=observable_data["mime_type"],
                )

Environment

gitlab in master branch

@sweet-mentat sweet-mentat added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Apr 12, 2024
@SamuelHassine SamuelHassine added this to the Release 6.1.0 milestone Apr 12, 2024
@jborozco jborozco removed the needs triage use to identify issue needing triage from Filigran Product team label Apr 15, 2024
@Archidoit Archidoit self-assigned this Apr 15, 2024
@Archidoit Archidoit added the solved use to identify issue that has been solved (must be linked to the solving PR) label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

No branches or pull requests

4 participants