mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(socket) if " " at begin execption occurs
This commit is contained in:
parent
8843036584
commit
498ed5134a
1 changed files with 5 additions and 5 deletions
|
|
@ -120,7 +120,7 @@
|
|||
function onMessage(pConnNum, pSocket) {
|
||||
return function(pCommand) {
|
||||
var lMsg, lJSON, lWinCommand, lExec_func, lDir,
|
||||
lHome, lError, lRet, lExecSymbols;
|
||||
lHome, lError, lRet, lExecSymbols, isContain;
|
||||
|
||||
Util.log('#' + pConnNum + ': ' + pCommand);
|
||||
|
||||
|
|
@ -191,11 +191,11 @@
|
|||
if(!ClientFuncs[pConnNum])
|
||||
ClientFuncs[pConnNum] = getExec(pSocket, pConnNum);
|
||||
|
||||
lExec_func = ClientFuncs[pConnNum];
|
||||
lExec_func = ClientFuncs[pConnNum];
|
||||
lExecSymbols = ['*','#', '&', '{', '}', '|', '\'', '"'];
|
||||
isContain = Util.isContainStr(pCommand, lExecSymbols);
|
||||
|
||||
lExecSymbols = ['*','#', '&', '{', '}', '|', '\'', '"'];
|
||||
|
||||
if (Util.isContainStr(pCommand, lExecSymbols))
|
||||
if (pCommand[0] === ' ' || isContain)
|
||||
exec(pCommand, lExec_func);
|
||||
else
|
||||
getSpawn(pSocket, pConnNum, pCommand);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue