Fixes #22335: Adds filename extension to tempfile for Vault

This commit is contained in:
Reid Wahl 2017-08-26 18:47:58 -05:00 committed by Brian Coca
parent 1f962bd937
commit f787be3597

View file

@ -662,7 +662,8 @@ class VaultEditor:
existing_data=None, force_save=False, vault_id=None):
# Create a tempfile
fd, tmp_path = tempfile.mkstemp()
root, ext = os.path.splitext(os.path.realpath(filename))
fd, tmp_path = tempfile.mkstemp(suffix=ext)
os.close(fd)
try: