110 | | self.logdebug("Launching internal command '%s' with arguments %s" % (command, arguments)) |
111 | | cmdfunc = getattr(self, "cmd%s" % command, self.cmdDefault) |
112 | | result = cmdfunc(arguments) |
| 113 | badchars = """/<>&"'#!%*$,;\\""" |
| 114 | cheatmeonce = 0 |
| 115 | for c in "".join(arguments) : |
| 116 | if c in badchars : |
| 117 | cheatmeonce = 1 |
| 118 | |
| 119 | if cheatmeonce : |
| 120 | self.logdebug("Possible intruder at %s : %s" % (useremail, str(arguments))) |
| 121 | result = "Either you mistyped your command, or you're a bad guy !" |
| 122 | else : |
| 123 | self.logdebug("Launching internal command '%s' with arguments %s" % (command, str(arguments))) |
| 124 | cmdfunc = getattr(self, "cmd%s" % command, self.cmdDefault) |
| 125 | result = cmdfunc(arguments) |