This document describes the security features and best practices implemented in the Universal File Converter project.
The Universal File Converter has been designed with secure file handling, input validation, and modular architecture to provide a safe and reliable file conversion experience.
Only supported file types are accepted for processing.
Supported formats include:
- DOCX
- TXT
- JPG
- JPEG
- PNG
- BMP
- WEBP
- TIFF
- CSV
- XLSX
- JSON
- XML
Unsupported file types are rejected before processing begins.
Every conversion request is validated before processing.
Validation includes:
- Supported input format
- Supported output format
- Valid conversion path
- Existing input file
Example:
- PDF β DOCX β
- PDF β PNG β
Uploaded filenames are sanitized before saving.
The application removes invalid filename characters to prevent filesystem errors and unsafe filenames.
Example:
my:file?.pdf
becomes
my_file_.pdf
If an output filename already exists, the application automatically generates a unique filename.
Example:
report.pdf
report_1.pdf
report_2.pdf
This prevents accidental overwriting of existing files.
The application detects encrypted PDF files before conversion.
Password-protected PDFs are not processed.
Users receive an informative error message instead of an application failure.
The application validates every uploaded PDF before merging.
Validation includes:
- Minimum of two PDF files
- PDF format verification
- Existing file validation
- Password-protected PDF detection
- Safe sequential page merging
If validation fails, the merge operation is stopped and a user-friendly error message is displayed.
All converters implement exception handling.
Common errors handled include:
- Corrupted files
- Unsupported formats
- Read errors
- Write errors
- Conversion failures
- Invalid PDF merge requests
The application displays user-friendly error messages instead of crashing.
Uploaded files are processed inside a dedicated temporary directory.
Benefits include:
- Separation from application files
- Easier cleanup
- Reduced risk of modifying original files
Old temporary and output files are automatically removed after the configured retention period.
Benefits:
- Reduced disk usage
- Better privacy
- Cleaner application environment
Users can manually clear generated output files using the application interface.
This helps maintain a clean working directory.
Converted files are saved separately from uploaded files.
Original files remain unchanged throughout the conversion process.
Merged PDF files are created as new output files without modifying the original uploaded PDFs.
Each converter only processes the formats it supports.
Converters include:
- Image Converter
- PDF Converter
- PDF Merge Converter
- Document Converter
- Spreadsheet Converter
- Data Converter
This minimizes unexpected processing behavior and keeps responsibilities isolated.
The application never executes shell commands using user-provided input.
No use of:
- Command Prompt
- PowerShell
- Bash
- Shell execution from uploaded filenames
This significantly reduces the risk of command injection.
All conversions are performed locally within the application.
Files are not uploaded to third-party services or external APIs during conversion or PDF merging.
Each Streamlit session maintains its own application state.
User sessions are isolated from one another during normal application use.
The project follows several software engineering best practices:
- Input validation
- Output validation
- Exception handling
- Modular architecture
- Separation of concerns
- Safe file handling
- Temporary storage
- Automatic cleanup
- Filename sanitization
- Password-protected PDF detection
- PDF merge validation
- Reusable utility functions
- Object-oriented design
| Feature | Status |
|---|---|
| File Type Validation | β |
| Input Validation | β |
| Filename Sanitization | β |
| Unique Filename Generation | β |
| Password-Protected PDF Detection | β |
| PDF Merge Validation | β |
| Exception Handling | β |
| Temporary Storage | β |
| Automatic Cleanup | β |
| Manual Cleanup | β |
| Output Isolation | β |
| Modular Architecture | β |
| No Shell Command Execution | β |
| Local Processing | β |
| Session Isolation | β |
Future versions may include:
- MIME type verification
- Maximum upload file size limits
- Automatic deletion immediately after download
- Malware scanning integration
- Secure random filenames
- User authentication
- Audit logging
- Rate limiting
- Cloud storage encryption
- Digital signature verification
- PDF splitting
- PDF compression
- PDF rotation
- PDF page extraction
When deployed using Render:
- HTTPS encryption is provided by the hosting platform.
- Files are processed on the server's temporary filesystem.
- Uploaded and converted files are not intended for long-term storage.
- Temporary files are automatically removed during cleanup.
- Merged PDF files are generated on the server and stored only in the configured output directory.
This project is intended for educational, portfolio, and general-purpose file conversion use.
Users should avoid uploading confidential or highly sensitive documents to any publicly deployed instance unless they fully trust the hosting environment and understand its security characteristics.
Version: 1.1.0
Last Updated: 17 July 2026