Secure Code Review -1 | Cheat sheet For Security Vulnerability In Python — Injection Flaws

1 year ago 122
BOOK THIS SPACE FOR AD
ARTICLE AD

Based on OWASP Top-10 Vulnerabilities. This time we are looking for secure coding bugs related to Injection Flaws

1) Path Traversal Attack

Vulnerable Code Blockdef get_video(self, path=None):
self.check_user_auth()
data = None
if not path:
path = self.get_video_path()
path = path[0] if path else None
if path:
with open(path, 'rb') as f:
data = bytearray(f.read())
return data
Read Entire Article