Skip to content

process_all_messages_files does not check that given files are messages files before reading #30

@faultyserver

Description

@faultyserver

I had a .zip file temporarily in one of the directories that a project was scanning for messages files to perform an export. When calling IntlMessagesDatabase#processAllMessagesFiles, that file was included because of a broad glob pattern (and the expectation that only valid files would be present), and the crate panicked at public::process_all_messages_files saying the file couldn't be read because it did not contain valid UTF-8.

Ideally, the database should check that the file is actually a messages file before trying to read it (based on file name), or should at least provide a more accurate, catchable error to describe why the processing failed. In this case, it would've been fine to just skip the file rather than panicking, for example.

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