BOOK THIS SPACE FOR AD
ARTICLE ADBased 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