mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 09:00:18 +01:00 
			
		
		
		
	[Nostromo] Escape pipe on remote commands
This commit is contained in:
		
							parent
							
								
									6e130b0285
								
							
						
					
					
						commit
						3b087b05b0
					
				@ -426,7 +426,7 @@ class Runtime
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $cmdRemote = str_replace(['"', '&', ';'], ['\"', '\&', '\;'], $cmdDelegate);
 | 
					        $cmdRemote = str_replace(['"', '&', ';', '|'], ['\"', '\&', '\;', '\|'], $cmdDelegate);
 | 
				
			||||||
        $cmdLocal = sprintf('ssh -p %d %s %s@%s sh -c \"%s\"', $sshConfig['port'], $sshConfig['flags'], $user, $host, $cmdRemote);
 | 
					        $cmdLocal = sprintf('ssh -p %d %s %s@%s sh -c \"%s\"', $sshConfig['port'], $sshConfig['flags'], $user, $host, $cmdRemote);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $this->runLocalCommand($cmdLocal, $timeout);
 | 
					        return $this->runLocalCommand($cmdLocal, $timeout);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user