Closed ghantoos closed 21 hours ago
The last commit prevents the traceback, and warns the user that the command was not executed. However, this does not fix the issue behind it: the string is chopped into pieces (e.g. with the | ), and the check is done on one part of the string, that includes only one parentheses; thus making the check fail with syntax error near unexpected token '('
. Keeping this open.
Received the following bug report by email.
Hi ghantoos, I got the following errors when use the lshell to restrict the user, We need to use grep command to filer the apache log , so we used too much regex expression, maybe some of them are not well recognized or proceeded by lshell
in the confiration /etc/lshell.conf, I already add the following to allowed list:
allowed : ['grep','cd','more','cat','ls','pwd','less','|','tail','head','wc','cut','df','gzip','gunzip','zip','unzip','tar','find','ssh','date','md5sum','ll','ftp',';','xargs','(',')']