Issue #22028: Ensure mimetypes will not open registry keys with embedded nulls
This commit is contained in:
parent
7a82afee70
commit
ebb8c2d528
|
@ -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