Skip to content

library.ReadManifest fails to parse the manifest file #3893

@votdev

Description

@votdev

To Reproduce
Call the library.ReadManifest function to parse a manifest that looks like

SHA1(wazuh-4.13.1-disk-1.vmdk) = 7c1af154f974a4dd448dc527f1f4216491973039
SHA1(wazuh-4.13.1.ovf) = d861e788a9f65975b6c51686b721792985db88c7

The result is an empty list. The problem is that the existing code expects a file that looks like

SHA1(wazuh-4.13.1-disk-1.vmdk)= 7c1af154f974a4dd448dc527f1f4216491973039
SHA1(wazuh-4.13.1.ovf)= d861e788a9f65975b6c51686b721792985db88c7

I haven't found out if there is a specification for the *.mf file, but a parser shouldn't fail because of a ) = instead of )= .

Expected behavior
The function should be able to parse the file, even if there is a blank where it is not expected.

Affected version
v0.52.0

Screenshots/Debug Output
n/a

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions