Skip to content

Commit

Permalink
Security fix (#9306)
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksanders authored Mar 30, 2022
1 parent c4ea122 commit 2a3c84e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ repos:
pass_filenames: true
args: ["--profile", "black"]

- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
language_version: python3.8
# - repo: https://github.com/ambv/black
# rev: 20.8b1
# hooks:
# - id: black
# language_version: python3.8

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.7.0
Expand Down
2 changes: 1 addition & 1 deletion consoleme/lib/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
required: true
condition:
StringLike:
ses:FromAddress: "{from_address}"
ses:FromAddress: "${from_address}"
action_map:
- name: send_email
text: Send Email
Expand Down
3 changes: 2 additions & 1 deletion consoleme/lib/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ async def iterate_and_format_dict(d: Dict, replacements: Dict):
await iterate_and_format_dict(v, replacements)
else:
try:
d[k] = v.format(**replacements)
s = string.Template(v)
d[k] = s.safe_substitute(**replacements)
except KeyError:
pass
return d
Expand Down

0 comments on commit 2a3c84e

Please sign in to comment.