noahmorrison / chevron

A Python implementation of mustache
MIT License
480 stars 52 forks source link

Make type checks of scope search more restrictive #105

Open theister opened 2 years ago

theister commented 2 years ago

When encountering a scope that is a str, we should not call getattr() on it and make a ducktyped check if it's actually a complex type. This could also return references to builtin functions of str, which in turn will cause unexpected behaviour downstream.

This PR fixes issue #104 .