Skip to content

Reject empty path arguments - #771

Open
AbhinavMir wants to merge 1 commit into
containers:mainfrom
AbhinavMir:reject-empty-path-arguments
Open

Reject empty path arguments#771
AbhinavMir wants to merge 1 commit into
containers:mainfrom
AbhinavMir:reject-empty-path-arguments

Conversation

@AbhinavMir

Copy link
Copy Markdown

Path arguments become real filenames by concatenation onto "/oldroot/"
or "/newroot/", so an empty path turns into the root directory.

`--bind-try "" DEST` therefore gave the sandbox read/write access to the
whole filesystem, and an empty destination replaced the sandbox root in
the same way. The variants without `-try` failed earlier, because
realpath() rejects an empty source, but the other options that take a
path had no check at all.

Check every path argument during option parsing, and report an empty one
as a usage error.
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