Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def doFsCommand(self, cmd):
"""
Executes a command via base64-encoded file
"""
cmdBase64 = fcp.node.base64encode(cmd)
if len(cmdBase64) > 254:
raise Exception("Command too long")
path = self.conf.mountpoint + "/cmds/" + cmdBase64
return file(path).read()