Math: Add comment about security.

This commit is contained in:
Valentin Lorentz 2015-09-28 18:59:29 +02:00
parent 0371480bd6
commit 27b878ff7c

View File

@ -189,6 +189,8 @@ class Math(callbacks.Plugin):
"Please remove them."))
return
if self._calc_match_forbidden_chars.match(text):
# Note: this is important to keep this to forbid usage of
# __builtins__
irc.error(_('There\'s really no reason why you should have '
'underscores or brackets in your mathematical '
'expression. Please remove them.'))
@ -243,6 +245,8 @@ class Math(callbacks.Plugin):
the 'trusted' capability to use.
"""
if self._calc_match_forbidden_chars.match(text):
# Note: this is important to keep this to forbid usage of
# __builtins__
irc.error(_('There\'s really no reason why you should have '
'underscores or brackets in your mathematical '
'expression. Please remove them.'))