Skip to content
This repository was archived by the owner on Oct 23, 2019. It is now read-only.
This repository was archived by the owner on Oct 23, 2019. It is now read-only.

Unsafe chat names when downloading media #100

@gumblex

Description

@gumblex

Some chat names, eg. "a/b/c", when using with
MediaFilenameFmt = usermedia/{name}-{context_id}/{type}-{filename}
can create folders like "usermedia/a/b/c--123456/document-filename.123.txt"

This is not intended and unsafe (like a/../../b), and also have problems with other filesystem filename restrictions. Please really sanitize the chat name, sender name and file names. For example, replace " * / : < > ? \ | characters with _.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions