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

I think short options taking a value in the same argv (i.e. `-o=1` stuff) isn't a GNUism mostly because it's backwards-incompatible with POSIX. `=` is a valid getopt option character, `chmod` uses it.

That said, I think? 'nloomans means for USER_CONTROLLED_DATA to be a set of short flags, not flag values, as in:

    root@08e9950d5bfd:/# export USER_CONTROLLED_DATA=lh 
    root@08e9950d5bfd:/# ls -a"$USER_CONTROLLED_DATA"
    total 56K
    drwxr-xr-x   1 root root 4.0K Mar 23 16:51 .
    drwxr-xr-x   1 root root 4.0K Mar 23 16:51 ..
    [...]
Not that I've seen this in the wild before. But everyone's use of bash is a unique personal hell anyway.


No I did mean flag values. Allowing user-controlled short flags is horrifying.




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

Search: