Comment 1 for bug 1413677

Revision history for this message
Ben Nemec (bnemec) wrote :

The call causing the exception is this:

LOG.debug(logging.mask_password("req : '%s'\n\n", req))

Which is not the correct way to call mask_password. This happened to "work" before due to some implementation details in mask_password, but after some recent refactoring that is no longer true. Note that when I say "work", I mean complete without exception. It wasn't actually masking any passwords because the string it was working on was the format string for the log message, not the content.

The correct code to do this looks like:

LOG.debug("req : '%s'\n\n", logging.mask_password(req))

That will mask any passwords in req, then pass it as a parameter to the logging function.