Browse code

BM-12802 Fix: tbird, password in log

Nicolas Lascombes authored on 08/02/2018 14:07:27
Showing 1 changed files
... ...
@@ -24,7 +24,7 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
24 24
 Components.utils.import("resource://gre/modules/Services.jsm");
25 25
 
26 26
 let logger = Components.classes["@blue-mind.net/logger;1"].getService().wrappedJSObject
27
-		    .getLogger("RPCClient: ");
27
+	.getLogger("RPCClient: ");
28 28
 
29 29
 function responseToString(response, aCommand) {
30 30
 	if (response) {
... ...
@@ -38,6 +38,8 @@ function sendDataToString(aCommand, aData) {
38 38
 		return "--photo--";
39 39
 	if (aCommand.url.indexOf("auth/login") != -1)
40 40
 		return "******";
41
+	if (aCommand.url.indexOf("login/native") != -1)
42
+		return aData.replace(/password=.*?(?=&)/, "password=******");
41 43
 	return aData;
42 44
 }
43 45