'Replace the values of POST parameters marked as sensitive with
stars (*********).'

def get_post_parameters(self, request):

    if (request is None):
        return {}
    else:
        sensitive_post_parameters = getattr(request, 'sensitive_post_parameters', [])
        if (self.is_active(request) and sensitive_post_parameters):
            cleansed = request.POST.copy()
            if (sensitive_post_parameters == '__ALL__'):
                for (k, v) in cleansed.items():
                    cleansed[k] = CLEANSED_SUBSTITUTE
                return cleansed
            else:
                for param in sensitive_post_parameters:
                    if (param in cleansed):
                        cleansed[param] = CLEANSED_SUBSTITUTE
                return cleansed
        else:
            return request.POST
