mirror of https://github.com/python/cpython
Issue #22028: Ensure mimetypes will not open registry keys with embedded nulls
This commit is contained in:
commit
12541dc22e
|
@ -246,7 +246,8 @@ class MimeTypes:
|
|||
except EnvironmentError:
|
||||
break
|
||||
else:
|
||||
yield ctype
|
||||
if '\0' not in ctype:
|
||||
yield ctype
|
||||
i += 1
|
||||
|
||||
with _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT, '') as hkcr:
|
||||
|
|
Loading…
Reference in New Issue