Skip to content

deploy: Refuse to run from a user's home directory - #150

Merged
virtuald merged 1 commit into
mainfrom
no-home
Oct 7, 2025
Merged

deploy: Refuse to run from a user's home directory#150
virtuald merged 1 commit into
mainfrom
no-home

Conversation

@virtuald

@virtuald virtuald commented Oct 6, 2025

Copy link
Copy Markdown
Member

- TBH there's lots of other ways to shoot yourself in the foot but this is an easy one
- Fixes #137
@TheTripleV

Copy link
Copy Markdown
Member

Maybe also add Desktop and Downloads? Those are commonly used as scratchpad directories.

@auscompgeek

Copy link
Copy Markdown
Member

Those directory names can be localised, and even moved on Windows, so actually checking those isn't entirely trivial. At least libraries like platformdirs exist.

@virtuald

virtuald commented Oct 7, 2025

Copy link
Copy Markdown
Member Author

Maybe also add Desktop and Downloads? Those are commonly used as scratchpad directories.

From the original issue:

On Windows if you open cmd I think it starts in your home directory by default? That would try to copy the entire user profile to the roborio, which seems bad.

We can't (and shouldn't) protect the user from everything. The 'default' directory specifically affects users who aren't familiar with the command line and have no idea what "current directory" means. Let's just keep it simple for now.

@virtuald
virtuald merged commit d95c71f into main Oct 7, 2025
19 checks passed
@virtuald
virtuald deleted the no-home branch October 7, 2025 01:41
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.

Refuse to run from user's home directory

3 participants