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

What would even be the proper way to do `system("wget.exe -q " . escapeshellarg($url))`? It’s ridiculous that plaintext IPC is still the primary interface for many tools.


Parse the URI query parameters and construct the command-line. "Parse, don't validate." Though still, that's just not enough here. If the command is a "main()" style command then you'll lose. You'll need to make sure that the command is safe to use with Unicode data regardless of codepage in use.


Agreed, Windows should just make some breaking changes already and adopt unix style arguments.


So we end up in a world 20 years from now where most applications still don't use that. I guess the main problem as described here is the mapping, as argument splitting was just one of the possible things that break (next to argument validation or bad file names).




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

Search: