mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Rename the type filter to type_debug
Because we add the names of all filters to the callable whitelist used by safe_eval, adding a filter named type makes it so code calling "type()" gets eval'd. We can't think of a way to exploit this but it's sufficiently sketchy that we're renaming it in case someone smarter than us can think of a problem.
This commit is contained in:
@@ -534,5 +534,5 @@ class FilterModule(object):
|
||||
'skip' : skipped,
|
||||
|
||||
# debug
|
||||
'type': lambda o: o.__class__.__name__,
|
||||
'type_debug': lambda o: o.__class__.__name__,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user