Merge "Mask password when logging request body" into stable/newton

This commit is contained in:
Jenkins 2017-06-15 07:30:00 +00:00 committed by Gerrit Code Review
commit 41fcc4fb5e
1 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,7 @@ from neutron_lib import exceptions
from oslo_log import log as logging
from oslo_policy import policy as oslo_policy
from oslo_utils import excutils
from oslo_utils import strutils
import six
import webob.exc
@ -681,7 +682,8 @@ class Controller(object):
if not body:
raise webob.exc.HTTPBadRequest(_("Resource body required"))
LOG.debug("Request body: %(body)s", {'body': body})
LOG.debug("Request body: %(body)s",
{'body': strutils.mask_password(body)})
try:
if collection in body:
if not allow_bulk: