mirror of
https://github.com/python/cpython.git
synced 2026-01-07 16:02:55 +00:00
Issue #22028: Ensure mimetypes will not open registry keys with embedded nulls
This commit is contained in:
commit
12541dc22e
1 changed files with 2 additions and 1 deletions
|
|
@ -246,7 +246,8 @@ def enum_types(mimedb):
|
|||
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…
Add table
Add a link
Reference in a new issue