mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-30 19:19:55 +00:00
Log received data AFTER filtering.
This allows applications to filter out sensitive information, such as passwords, so that it won't appear in the logs. It does mean that the debug logs will not show the actual received data, and there will be no indication of tampering, unless the filter author explicitly logs and notes that a change was made.
This commit is contained in:
parent
45ed68006f
commit
f6e30edbc4
1 changed files with 3 additions and 2 deletions
|
@ -1276,8 +1276,6 @@ class XMLStream(object):
|
|||
:param xml: The :class:`~sleekxmpp.xmlstream.stanzabase.ElementBase`
|
||||
stanza to analyze.
|
||||
"""
|
||||
log.debug("RECV: %s", tostring(xml, xmlns=self.default_ns,
|
||||
stream=self))
|
||||
# Apply any preprocessing filters.
|
||||
xml = self.incoming_filter(xml)
|
||||
|
||||
|
@ -1291,6 +1289,9 @@ class XMLStream(object):
|
|||
if stanza is None:
|
||||
return
|
||||
|
||||
log.debug("RECV: %s", tostring(xml, xmlns=self.default_ns,
|
||||
stream=self))
|
||||
|
||||
# Match the stanza against registered handlers. Handlers marked
|
||||
# to run "in stream" will be executed immediately; the rest will
|
||||
# be queued.
|
||||
|
|
Loading…
Reference in a new issue