def disable_insecure_serializers(allowed=[u'json']):
 for name in registry._decoders:
  registry.disable(name)
 if (allowed is not None):
  for name in allowed:
   registry.enable(name)

def disable_insecure_serializers ( allowed = [ u'json' ] ) : for name in registry . _decoders : registry . disable ( name ) if ( allowed is not None ) : for name in allowed : registry . enable ( name )
disable untrusted serializers .