Skip to content

Commit 2a3c84e

Browse files
Security fix (#9306)
1 parent c4ea122 commit 2a3c84e

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Diff for: .pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ repos:
2727
pass_filenames: true
2828
args: ["--profile", "black"]
2929

30-
- repo: https://github.com/ambv/black
31-
rev: 20.8b1
32-
hooks:
33-
- id: black
34-
language_version: python3.8
30+
# - repo: https://github.com/ambv/black
31+
# rev: 20.8b1
32+
# hooks:
33+
# - id: black
34+
# language_version: python3.8
3535

3636
- repo: https://github.com/pre-commit/pygrep-hooks
3737
rev: v1.7.0

Diff for: consoleme/lib/defaults.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
required: true
194194
condition:
195195
StringLike:
196-
ses:FromAddress: "{from_address}"
196+
ses:FromAddress: "${from_address}"
197197
action_map:
198198
- name: send_email
199199
text: Send Email

Diff for: consoleme/lib/generic.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ async def iterate_and_format_dict(d: Dict, replacements: Dict):
240240
await iterate_and_format_dict(v, replacements)
241241
else:
242242
try:
243-
d[k] = v.format(**replacements)
243+
s = string.Template(v)
244+
d[k] = s.safe_substitute(**replacements)
244245
except KeyError:
245246
pass
246247
return d

0 commit comments

Comments
 (0)