Bug 1497259 - 2. Don't log auto-fill values; r=droeh, a=ritu GECKOVIEW_62_RELBRANCH
authorJim Chen <nchen@mozilla.com>
Wed, 10 Oct 2018 17:36:11 +0000
branchGECKOVIEW_62_RELBRANCH
changeset 481205 b24c34189591
parent 481204 d335b16bbb7c
child 481206 d66bd740b59f
push id1814
push usernchen@mozilla.com
push dateThu, 11 Oct 2018 21:42:25 +0000
treeherdermozilla-release@d66bd740b59f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdroeh, ritu
bugs1497259
milestone62.0.3
Bug 1497259 - 2. Don't log auto-fill values; r=droeh, a=ritu Auto-fill values can contain personal information and must not appear in the log. Differential Revision: https://phabricator.services.mozilla.com/D8051
mobile/android/chrome/geckoview/GeckoViewContent.js
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
--- a/mobile/android/chrome/geckoview/GeckoViewContent.js
+++ b/mobile/android/chrome/geckoview/GeckoViewContent.js
@@ -448,17 +448,17 @@ class GeckoViewContent extends GeckoView
 
     const rootInfo = getInfo(aFormLike.rootElement, null);
     rootInfo.children = aFormLike.elements.map(
         element => getInfo(element, rootInfo.id));
 
     this.eventDispatcher.dispatch("GeckoView:AddAutoFill", rootInfo, {
       onSuccess: responses => {
         // `responses` is an object with IDs as keys.
-        debug `Performing auto-fill ${responses}`;
+        debug `Performing auto-fill ${Object.keys(responses)}`;
 
         const AUTOFILL_STATE = "-moz-autofill";
         const winUtils = content.windowUtils;
 
         for (let id in responses) {
           const entry = this._autoFillElements &&
                         this._autoFillElements.get(+id);
           const element = entry && entry.get();
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
@@ -658,17 +658,17 @@ public class SessionAccessibility {
             if (bundle == null) {
                 return false;
             }
             rootId = currentId;
             currentId = bundle.getInt("parent", View.NO_ID);
         }
 
         if (DEBUG) {
-            Log.d(LOGTAG, "performAutoFill(" + id + ", " + value + ')');
+            Log.d(LOGTAG, "performAutoFill(" + id + ')');
         }
 
         final EventCallback callback = mAutoFillRoots.get(rootId);
         if (callback == null) {
             return false;
         }
 
         final GeckoBundle response = new GeckoBundle(1);
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
@@ -537,18 +537,17 @@ public final class SessionTextInput {
         GeckoBundle response = null;
         EventCallback callback = null;
 
         for (int i = 0; i < values.size(); i++) {
             final int id = values.keyAt(i);
             final CharSequence value = values.valueAt(i);
 
             if (DEBUG) {
-                Log.d(LOGTAG,
-                      "performAutoFill(" + id + ", " + values + ')');
+                Log.d(LOGTAG, "performAutoFill(" + id + ')');
             }
             int rootId = id;
             for (int currentId = id; currentId != View.NO_ID; ) {
                 final GeckoBundle bundle = mAutoFillNodes.get(currentId);
                 if (bundle == null) {
                     return;
                 }
                 rootId = currentId;