Skip to main content

Module sanitize

Module sanitize 

Source
Expand description

Entry-name validation helpers. Entry-name validation and sanitization.

Encrypted containers store filenames. A malicious container (or a hostile peer) can embed names like ../../.ssh/id_rsa; anything reconstructed from stored names and joined onto a user-supplied destination must pass through [sanitize_entry_name] first.

Constants§

MAX_NAME_LEN
Maximum accepted entry-name length in bytes.

Functions§

sanitize_stored_name
Makes an untrusted, previously-stored name safe to join onto a filesystem path.
validate_new_name
Validates a name supplied for a new vault entry.