1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-27 07:38:30 +00:00

Fix ImpersonateTarget sanitization (#13791)

Fix 32809eb2da

Authored by: bashonly
This commit is contained in:
bashonly 2025-07-21 13:41:00 -05:00 committed by GitHub
parent 8820101aa3
commit 2ac3eb9837
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3716,6 +3716,8 @@ def filter_fn(obj):
return {k: filter_fn(v) for k, v in obj.items() if not reject(k, v)}
elif isinstance(obj, (list, tuple, set, LazyList)):
return list(map(filter_fn, obj))
elif isinstance(obj, ImpersonateTarget):
return str(obj)
elif obj is None or isinstance(obj, (str, int, float, bool)):
return obj
else: