Anonymous password and ftp account passwords are hidden in the output trace file.
This commit is contained in:
parent
5fc61f26c5
commit
1734cf4c2c
1 changed files with 15 additions and 2 deletions
|
@ -112,6 +112,15 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
filename = file;
|
filename = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void stripContent(XmlElement el, String tagName)
|
||||||
|
{
|
||||||
|
XmlNodeList passwords = el.GetElementsByTagName(tagName);
|
||||||
|
for (int i = 0; i < passwords.Count; ++i)
|
||||||
|
{
|
||||||
|
XmlNode node = passwords.Item(i);
|
||||||
|
node.InnerXml = "*****";
|
||||||
|
}
|
||||||
|
}
|
||||||
public override SoapFilterResult ProcessMessage(SoapEnvelope envelope)
|
public override SoapFilterResult ProcessMessage(SoapEnvelope envelope)
|
||||||
{
|
{
|
||||||
XmlDocument dom = null;
|
XmlDocument dom = null;
|
||||||
|
@ -137,12 +146,16 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
XmlNode newNode = dom.ImportNode(envelope.DocumentElement, true);
|
XmlNode newNode = dom.ImportNode(envelope.DocumentElement, true);
|
||||||
XmlNodeList passwords = (newNode as XmlElement).GetElementsByTagName("password");
|
XmlElement el = newNode as XmlElement;
|
||||||
|
stripContent(el, "password");
|
||||||
|
stripContent(el, "Password");
|
||||||
|
stripContent(el, "AnonymousUserPassword");
|
||||||
|
/* XmlNodeList passwords = (newNode as XmlElement).GetElementsByTagName("password");
|
||||||
for (int i = 0; i < passwords.Count; ++i)
|
for (int i = 0; i < passwords.Count; ++i)
|
||||||
{
|
{
|
||||||
XmlNode node = passwords.Item(i);
|
XmlNode node = passwords.Item(i);
|
||||||
node.InnerXml = "*****";
|
node.InnerXml = "*****";
|
||||||
}
|
} */
|
||||||
|
|
||||||
rootNode.AppendChild(newNode);
|
rootNode.AppendChild(newNode);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue