noahmorrison / chevron

A Python implementation of mustache
MIT License
510 stars 54 forks source link

Make type checks of scope search more restrictive #105

Open theister opened 3 years ago

theister commented 3 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 .