Skip to content

Disable lambdas or at least prohibit execution of lambdas with parameters #1565

@nknapp

Description

@nknapp

In the discussion about the recent security issues, we came to the conclusion that Handlebars should not support the execution of lambdas, like mustache does. The functionality could still be there, activated by an option, but the default should be to only ever execute helper functions and never methods of the input object itself.

There three different flavors of doing that:

  1. Disable lambdas completely
  2. Disable lambdas that are defined on the proto of the input object.
  3. Disable passing parameters to lambdas that are defined on the proto.
  4. Disable passing parameters to lambdas.
  5. Disable everything on the proto (this would disable array.length)

I would like to know if anybody is using any of the cases above and what kind of proto-properties you are using in your templates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions