Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only allow a --filename that resolves to file in pwd #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcus-h
Copy link
Member

@marcus-h marcus-h commented Mar 3, 2016

An arbitrary filename can be a "security" issue. Also, check the
--package parameter, because otherwise we could "modify" an arbitrary
*.changes file (less critical, though).

git_tarballs Outdated
basename = os.path.basename(filename)
if os.path.abspath(filename) != os.path.abspath(basename):
# no arbitrary filename, please
sys.exit("%s: illegal filename" % filename)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make that a little bit more explicit ? "illegal filename" is not very helpful if thrown. maybe say something like "--filename needs to be pointing to a file in the current directory" ?

An arbitrary filename can be a "security" issue. Also, check the
--package parameter, because otherwise we could "modify" an arbitrary
*.changes file (less critical, though).
@marcus-h
Copy link
Member Author

marcus-h commented Sep 4, 2018 via email

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.

2 participants