Skip to content

Name validation rejects DEL but not the other control characters below 32 #660

Open

Description

@sophiecarreras

What happens

validate_b2_file_name rejects chr(127) but accepts names with control characters such as \x01. I expect the service to refuse such names with a 400 error, so the check is only an early local validation that is missing; I have not verified the server response.

Where

b2sdk/_internal/utils/__init__.py:246-259 (validate_b2_file_name, DEL check at :256-257).

Why it matters

Impact: Wrong request or result, loud if the server rejects them. Severity: Low, because the validation gap only moves the failure from the client to the server, and the effect on the server is not verified.

How to check

Call validate_b2_file_name('a\x01b'); it returns without raising. Found by reading the code, not reproduced.

Version

Seen at v2.13.4. Present on the default branch: present.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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