Expand description
Input sanitisation for file paths and URLs.
Guards against:
- Directory traversal in filenames originating from Immich API responses
- Non-HTTP(S) URL schemes in user-provided server addresses
Functionsยง
- safe_
filename - Strip a filename to its final component and reject traversal attempts.
- validate_
http_ url - Validate that a URL string uses an HTTP or HTTPS scheme.