Skip to content

feat(FileUploader): Add filename sanitization on upload #52

@usernane

Description

@usernane

Problem Statement

The uploader does not sanitize filenames for special characters, spaces, path separators, or unicode that could cause issues on different filesystems or create security vulnerabilities (e.g., null bytes, ../ sequences).

Proposed Solution

Sanitize uploaded filenames by:

  • Removing or replacing path separators (/, \\)
  • Removing null bytes
  • Replacing spaces and special characters with safe alternatives
  • Optionally allowing a custom sanitization callback

Alternatives Considered

  • Leaving sanitization to the user (error-prone)
  • Only stripping path separators (insufficient)

Breaking Change

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions