Skip to content

Feature (or help?): Restrict Object Property Getters to whitelist? #154

Description

@Pxtl

One thing about "logicless" templates is that they feel safe. Like, safe to let end-users make them, as long as you HTML sanitize.

However, the method member-function-lookup makes it hard to use them in an "untrusted template" capacity. Even if I provide only clean objects with safe parameterless (or all-default) non-void functions, I don't know what trouble the template could get into via .GetType. Being able to say ToUpper is nice, but there's definitely a trade-off.

And since the Object ValueGetter is "All One Piece", and isn't realistically modular or customizable, it means that the only way to have a "safe" object ValueGetter is to completely replace it.

edit: I'd be happy to be told "oh you're missing something we actually already have a good way to do this", hence "or help?" in title.

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