Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can run git init in /tmp.


Then don't run commands in PS1 that blindly execute arbitrary code in that directory.

Honestly, people haven't learned a single thing from Window's autorun days.


> Then don't run commands in PS1 that blindly execute arbitrary code in that directory.

That's like telling people "be secure". Nobody expected that git commands would do that, and also they shouldn't do that.

Not that I think this is a good fix...


This is kind of why I’d want a git command that doesn’t blindly execute arbitrary code from the directory, as I mentioned above.


The intention of someone running `git log` or `git status` isn't to execute arbitrary code, it's to see a log or the changed files. Telling people "just don't run arbitrary untrusted code" is useless advice when the whole problem is that git runs arbitrary untrusted code in situations where most people wouldn't expect it to execute arbitrary code.

At least spend a couple seconds to think about what you're saying and how it relates to the issue at hand. You're being insufferable.


I mean, I don't have git status in PS1 anyway, but I woke up today not knowing that git status will run arbitrary commands. The documentation for git-status does not mention this possibility, like git-commit and git-pull do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: