Skip to content
Myr

work around a pylons oddity

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 1dcdac5 · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:jinja/utils.py+5 added-1 removed
198 unmodified lines
199 raise SecurityException('not allowed to access internal attributes')200 if getattr(obj, '__class__', None) in callable_types and \201 name.startswith('func_') or name.startswith('im_'):202 raise SecurityException('not allowed to access function attributes')203204 r = _getattr(obj, 'jinja_allowed_attributes', None)205 # the empty string check is for pylons which returns empty strings on206 # it's stacked something foobar object204 if r is not None and name not in r:207 if r not in (None, '') and name not in r:208 print "broken here"209 raise SecurityException('disallowed attribute accessed')210211 # attribute lookups convert unicode strings to ascii bytestrings.212 # this process could raise an UnicodeEncodeError.
436 unmodified lines