commit/galaxy-central: natefoo: Add logical operators to the compute tool whitelist.

1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/685a17af92df/ changeset: 685a17af92df user: natefoo date: 2012-10-08 16:28:29 summary: Add logical operators to the compute tool whitelist. affected #: 1 file diff -r 26dfa56403e1011445854560b3e9818180b3c8c2 -r 685a17af92dfd6a2e3d7e3c9a3a4b119c78a6f96 tools/stats/column_maker.py --- a/tools/stats/column_maker.py +++ b/tools/stats/column_maker.py @@ -46,9 +46,10 @@ for key, value in mapped_str.items(): expr = expr.replace( key, value ) +operators = 'is|not|or|and' builtin_and_math_functions = 'abs|all|any|bin|chr|cmp|complex|divmod|float|hex|int|len|long|max|min|oct|ord|pow|range|reversed|round|sorted|str|sum|type|unichr|unicode|log|exp|sqrt|ceil|floor' string_and_list_methods = [ name for name in dir('') + dir([]) if not name.startswith('_') ] -whitelist = "^([c0-9\+\-\*\/\(\)\.\'\"><=,: ]|%s|%s)*$" % (builtin_and_math_functions, '|'.join(string_and_list_methods)) +whitelist = "^([c0-9\+\-\*\/\(\)\.\'\"><=,:! ]|%s|%s|%s)*$" % (operators, builtin_and_math_functions, '|'.join(string_and_list_methods)) if not re.compile(whitelist).match(expr): stop_err("Invalid expression") Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket