disable_untrusted_serializers
Disables insecure serializers by restricting the allowed formats to a specified whitelist.
def disable_untrusted_serializers(
whitelist: list[str] = None
) - > null
Disables insecure data serialization formats to prevent remote code execution vulnerabilities. Use this to restrict the application to only safe, whitelisted serializers.
Parameters
| Name | Type | Description |
|---|---|---|
| whitelist | list[str] = None | A list of trusted serializer names that should remain enabled, such as 'json' or 'msgpack'. |
Returns
| Type | Description |
|---|---|
null | Nothing is returned; the function modifies the global serialization configuration state. |