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

Passing an empty Github Action variable to remote_path circumvents validation and targets the root / directory #44

Closed
maximilliangeorge opened this issue Jun 5, 2023 · 2 comments · Fixed by #45
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers resolved

Comments

@maximilliangeorge
Copy link

maximilliangeorge commented Jun 5, 2023

As the title says, I accidentally passed an empty variable to remote_path (I wrote ${{ env.REMOTE_PATH }} instead of ${{ vars.REMOTE_PATH }}). I was expecting this action to throw an error if I had mistyped, but the action actually ran and – you know the rest. I basically nuked the root directory of the remote server, since I also passed the --delete flag.

A more fool proof validation of the required input variables would be appreciated.

@maximilliangeorge maximilliangeorge changed the title Passing a Github Action variable to remote_path circumvents validation Passing an empty Github Action variable to remote_path circumvents validation Jun 5, 2023
@maximilliangeorge maximilliangeorge changed the title Passing an empty Github Action variable to remote_path circumvents validation Passing an empty Github Action variable to remote_path circumvents validation, targeting the root / directory Jun 5, 2023
@maximilliangeorge maximilliangeorge changed the title Passing an empty Github Action variable to remote_path circumvents validation, targeting the root / directory Passing an empty Github Action variable to remote_path circumvents validation and targets the root / directory Jun 5, 2023
@Burnett01
Copy link
Owner

Hello thank you for your message.
That is unfortunate that you accidentally nuked your root dir.
In the next version it will no longer be possible to supply an empty string to the remote_path key.

Greetings

Steve

@Burnett01 Burnett01 added enhancement New feature or request good first issue Good for newcomers labels Jun 8, 2023
@Burnett01 Burnett01 self-assigned this Jun 8, 2023
Burnett01 added a commit that referenced this issue Jun 8, 2023
- It is no longer possible to use an empty string as remote_path (Fixes #44) (Thanks to @maximilliangeorge)
- Updated checkout action in examples from v2 to v3
- Added disclaimer to media site-links
- Overall readme improvements
@Burnett01 Burnett01 mentioned this issue Jun 8, 2023
@Burnett01
Copy link
Owner

Burnett01 commented Jun 8, 2023

A fix has been released as a new major (6.0.0) alongside other small improvements to the readme.
It now trims the remote_path in the context of checking for empty value.

image

Thank you very much. Changelog https://github.com/Burnett01/rsync-deployments/releases/tag/6.0.0

Greetings

Steven

Burnett01 added a commit that referenced this issue Jul 1, 2024
- It is no longer possible to use an empty string as remote_path (Fixes #44) (Thanks to @maximilliangeorge)
- Updated checkout action in examples from v2 to v3
- Added disclaimer to media site-links
- Overall readme improvements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants