Attempt to patch a possible message injection hole.

This commit is contained in:
Sean B. Palmer
2011-09-05 17:46:17 +01:00
parent 66edd83372
commit 2d3009ccb1
9 changed files with 101 additions and 28 deletions

2
bot.py
View File

@@ -55,6 +55,8 @@ class Phenny(irc.Bot):
for filename in filenames:
name = os.path.basename(filename)[:-3]
if name in excluded_modules: continue
# if name in sys.modules:
# del sys.modules[name]
try: module = imp.load_source(name, filename)
except Exception, e:
print >> sys.stderr, "Error loading %s: %s (in bot.py)" % (name, e)