Skip to content

fix(security): prevent path traversal in api_cron_run_log#507

Open
dumko2001 wants to merge 2 commits intovivekchand:mainfrom
dumko2001:fix-001
Open

fix(security): prevent path traversal in api_cron_run_log#507
dumko2001 wants to merge 2 commits intovivekchand:mainfrom
dumko2001:fix-001

Conversation

@dumko2001
Copy link
Copy Markdown
Contributor

Summary

Prevent path traversal vulnerability by sanitizing the session_id parameter before file operations.

Changes

  • Added path normalization with os.path.normpath()
  • Added validation that resolved path starts with expected directory
  • Returns 403 if traversal is detected

Testing

tests/test_security.py - 4 test cases covering traversal attacks. All pass.

Files Changed

  • dashboard.py
  • tests/test_security.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant