summaryrefslogtreecommitdiff
path: root/changelogs/fragments/pathlist_strip.yml
diff options
context:
space:
mode:
authorRick Elrod <rick@elrod.me>2020-04-22 17:20:12 -0500
committerGitHub <noreply@github.com>2020-04-22 17:20:12 -0500
commitcace616aab91480f2139dc7b14d7d13929f34104 (patch)
tree03193ca38927962542d55f83d09c0813ac84a557 /changelogs/fragments/pathlist_strip.yml
parentda98fc267a8f8e830069ab277fe5d9593b76e54f (diff)
downloadansible-cace616aab91480f2139dc7b14d7d13929f34104.tar.gz
Filter BLACKLIST_EXTS in PluginLoader (#69029)
Change: Rather than hardcoding .pyo and .pyc, filter on all BLACKLIST_EXTS in the non-legacy logic of PluginLoader (_find_fq_plugin). The two harcoded extensions are part of BLACKLIST_EXTS already and this simply adds the rest of the blacklisted extensions to the check. In addition, check .endswith() instead of an exact match of the suffix, like everywhere else that uses BLACKLIST_EXTS. This allows for blacklisting, for example, emacs's backup files which can appear after any extension, leading to things like `foo.py~`. Test Plan: Ran `ansible-playbook` against a collection where a `foo.py~` module was getting executed instead of `foo.py` which also appeared in the same directory. `foo.py~` is no longer executed. Tickets: Fixes #22268 Refs #27235 Signed-off-by: Rick Elrod <rick@elrod.me>
Diffstat (limited to 'changelogs/fragments/pathlist_strip.yml')
0 files changed, 0 insertions, 0 deletions