[tuxdroid-svn] r5286 - software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-08-06 08:20:24
|
Author: remi
Date: 2009-08-06 10:20:05 +0200 (Thu, 06 Aug 2009)
New Revision: 5286
Modified:
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
Log:
* Hide user passwords from the plugins logs.
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py 2009-08-06 07:45:11 UTC (rev 5285)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py 2009-08-06 08:20:05 UTC (rev 5286)
@@ -192,6 +192,8 @@
messageStr = ""
for message in messagesList:
messageStr += message
+ if messageStr.lower().find(" password:") != -1:
+ messageStr = " password:********"
plugin = pluginInterpreterContext.getParentPlugin()
self.logger.logDebug("Plugin TRACE [%s] (%s)" % (
plugin.getDescription().getName(), messageStr))
@@ -229,9 +231,13 @@
plugin = pluginInterpreterContext.getParentPlugin()
self.__publishEvents(False, ST_NAME_PS_PLUGIN_STARTED,
[plugin.getDescription().getUuid(),])
+ params = copy.deepcopy(pluginInterpreterContext.getInstanceParameters())
+ if params.has_key('password'):
+ params['password'] = '********'
+ if params.has_key('Password'):
+ params['Password'] = '********'
self.logger.logInfo("Plugin starting [%s] (%s)" % (
- plugin.getDescription().getName(),
- str(pluginInterpreterContext.getInstanceParameters())))
+ plugin.getDescription().getName(), str(params)))
command = plugin.getCommand(pluginInterpreterContext.getInstanceCommandName())
if (not command.isNotifier()) and (command.getName() == "run"):
resourceRobotContentInteractions.getPguContextsManager().createPguContext(
|