On 7/2/15 3:22 AM, Marcus Hildum wrote: > Bash Version: 4.3 > Patch Level: 33 > Release Status: release > > Description: > It is possible to supply many ascii control characters as function > names. This allows obfuscation of function calls because the majority of > these are non printing characters. > > > https://github.com/airencracken/why/blob/master/control_character_functions.sh > > Repeat-By: > Define a function with a control character, then call it. > Fix: > Disallow functions to be named after control characters or non-printing > characters in general.
I don't view this as a problem. The namespace for functions is the same as the namespace for shell scripts and executables. If you want to restrict this, you can run bash in Posix mode. One of the Posix rules bash enforces in this mode is restricting function names to the valid shell identifier namespace. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/