Skip to content

Column 'extra' is treated wrongly #62

@sebix

Description

@sebix

If the tableformat includes the entire column 'extra', this code falsly creates an ExtraColumn with rest = '', but instead should treat it like a normal IntelMQColumn:

if isinstance(col, tuple):
intelmq_field, column_title = col
first_component, sep, rest = intelmq_field.partition(".")
if first_component == "extra":
return ExtraColumn(column_title, rest)
else:
return IntelMQColumn(column_title, intelmq_field)

As a result, if a user has this column specification:

("extra", "extra")

mailgen actually accesses extra. (or written differently: extra[''] and the result in the attachment is an empty string.

The workaround is this column specification:

IntelMQColumn("extra", "extra"),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions