Expand description
Shared validation utilities for validating and sanitizing user input.
This module provides security utilities for validating user input that can be reused between the bssh client and server implementations.
§Security
These functions are designed to prevent:
- Path traversal attacks
- Command injection
- Information leakage through error messages
Functions§
- sanitize_
error_ message - Sanitize error messages to prevent information leakage.
- validate_
hostname - Sanitize a hostname to prevent injection attacks.
- validate_
local_ path - Validate and sanitize a local file path to prevent path traversal attacks.
- validate_
remote_ path - Validate a remote path string to prevent injection attacks.
- validate_
username - Validate a username to prevent injection attacks.