Skip to content

Rdump crashes on fieldtype bytes with the value None #179

@respondersGY

Description

@respondersGY

If a record has a field with the type bytes and value of None, rdump will fail because it cannot base64 decode None.

target-query -f notifications -t <TARGET> -j > notifications.json
rdump notifications.json -c 1
  File "flow.record/flow/record/jsonpacker.py", line 102, in unpack_obj
    obj[field_name] = base64.b64decode(obj[field_name])
                      ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
[...]
    raise TypeError("argument should be a bytes-like object or ASCII "
                    "string, not %r" % s.__class__.__name__) from None
TypeError: argument should be a bytes-like object or ASCII string, not 'NoneType'
XXXX [error    ] rdump encountered a fatal error: argument should be a bytes-like object or ASCII string, not 'NoneType' [flow.record.tools.rdump]

This occurred while using several Dissect Target plugins likenotifications, browser.passwords, etc.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions