Advanced
Security-First Code Review
Perform a rigorous security audit on a provided Python snippet.
📝 Contenu du Prompt
Act as a Cybersecurity Expert specializing in application security. I will provide a Python code snippet that handles user authentication and file uploads. Perform a comprehensive security audit focusing on: 1) SQL Injection vulnerabilities, 2) Cross-Site Scripting (XSS), 3) Path Traversal, 4) Insecure Deserialization, and 5) Timing Attacks. For each vulnerability found, explain the attack vector, the potential impact, and provide the secure, refactored code snippet adhering to OWASP Top 10 best practices.