GitHub: Allow new IPs used by the GitHub web hooks.

master
Valentin Lorentz 2012-02-11 09:06:59 +01:00
parent 6b2c12883e
commit b003ae92d0
3 changed files with 8 additions and 4 deletions

View File

@ -65,7 +65,8 @@ class GithubCallback(httpserver.SupyHTTPServerCallback):
You shouldn't be there, this subfolder is not for you. Go back to the
index and try out other plugins (if any).""")
def doPost(self, handler, path, form):
if not handler.address_string().endswith('.rs.github.com'):
if not handler.address_string().endswith('.rs.github.com') and \
not handler.address_string().endswith('.cloud-ips.com'):
log.warning("""'%s' tryed to act as a web hook for Github,
but is not GitHub.""" % handler.address_string())
else:

View File

@ -41,9 +41,9 @@ def configure(advanced):
conf.registerPlugin('SupySandbox', True)
PySandbox = conf.registerPlugin('SupySandbox')
SupySandbox = conf.registerPlugin('SupySandbox')
# This is where your configuration variables (if any) should go. For example:
# conf.registerGlobalValue(PySandbox, 'someConfigVariableName',
# conf.registerGlobalValue(SupySandbox, 'someConfigVariableName',
# registry.Boolean(False, """Help for someConfigVariableName."""))

View File

@ -58,7 +58,10 @@ try:
class WebStatsInternationalization(_PluginInternationalization):
def __init__(self):
self.name = 'WebStats'
self.loadLocale(conf.supybot.language())
try:
self.loadLocale(conf.supybot.language())
except:
pass
_ = WebStatsInternationalization()
except ImportError:
_ = lambda x:x