Hi, On Nov 19, 5:28 am, kwellman <[email protected]> wrote: > Is there a way to disable or override mathematical operations? There is not a nice way currently, but I am willing to extend the sandbox feature to wrap mathematical operations.
> Also, the same problem exists with evaluating the "range" function. The range function already got somewhat nerfed in that it no longer allows arbitrary ranges and that it never creates a list. > I see no way of evaluating whether a callable is safe in the context > of the arguments that are passed to it. That's because this is already a feature that is possible without the sandbox. Each call in Jinja2 that does not go to a builtin operator is passed through Environment.call or SandboxedEnvironment.call. You can override this method to prevent or allow the invocation of the method based on arguments. Regards, Armin -- You received this message because you are subscribed to the Google Groups "pocoo-libs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pocoo-libs?hl=en.
