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

fix: disallow . and .. for dstDir #229

Merged
merged 1 commit into from
Aug 15, 2024
Merged

fix: disallow . and .. for dstDir #229

merged 1 commit into from
Aug 15, 2024

Conversation

0xDEC0DE
Copy link
Contributor

@0xDEC0DE 0xDEC0DE commented Aug 9, 2024

The overlay code calls RemoveAll on existing target directories, which absolutely does not work when the target directory is the current or parent directory. Check for this when validating the config file, so it can fail-fast.

Update docs to explicitly admonish people trying to do this.

Fixes: Issue #228

@0xDEC0DE
Copy link
Contributor Author

0xDEC0DE commented Aug 9, 2024

The error message isn't going to win any beauty contests, but this does the job.

If there's an easy way to compel validator to emit custom error messages on specific validation failures, I'm all ears; but I couldn't work it out.

The overlay code calls `RemoveAll` on existing target directories,
which absolutely does not work when the target directory is the
current or parent directory.  Check for this when validating the
config file, so it can fail-fast.

Update docs to explicitly admonish people trying to do this.

Fixes: Issue retr0h#228
@retr0h retr0h merged commit 3431544 into retr0h:main Aug 15, 2024
6 checks passed
@retr0h retr0h mentioned this pull request Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants