Skip to content

Fix path traversal in absltest.create_file#405

Open
rootvector2 wants to merge 1 commit intoabseil:mainfrom
rootvector2:absltest-path-traversal
Open

Fix path traversal in absltest.create_file#405
rootvector2 wants to merge 1 commit intoabseil:mainfrom
rootvector2:absltest-path-traversal

Conversation

@rootvector2
Copy link
Copy Markdown

This change ensures create_file only writes inside the temp directory.

It normalizes the input path, rejects absolute paths, and checks that the final path stays within the base directory.

Valid relative paths continue to work as before. Added tests for both valid and invalid cases.

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