|
@@ -9,7 +9,6 @@
|
|
|
from __future__ import absolute_import
|
|
|
from __future__ import with_statement
|
|
|
|
|
|
-from kombu import disable_insecure_serializers
|
|
|
from kombu.serialization import registry
|
|
|
|
|
|
from celery import current_app
|
|
@@ -36,7 +35,8 @@ Please see the configuration reference for more information.
|
|
|
|
|
|
|
|
|
def disable_untrusted_serializers(whitelist=None):
|
|
|
- disable_insecure_serializers(whitelist)
|
|
|
+ for name in set(registry._decoders) - set(whitelist or []):
|
|
|
+ registry.disable(name)whitelist)
|
|
|
|
|
|
|
|
|
def setup_security(allowed_serializers=None, key=None, cert=None, store=None,
|