From f91c480ad8668462968a585ee1b9f8fee71c2724 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Thu, 3 Aug 2017 15:40:26 +0300 Subject: [PATCH] remove sensitive data from debug output --- src/status_im/accounts/recover/handlers.cljs | 3 +-- src/status_im/chat/handlers/send_message.cljs | 2 -- src/status_im/components/status.cljs | 5 +++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/status_im/accounts/recover/handlers.cljs b/src/status_im/accounts/recover/handlers.cljs index c1bb8528af..e3c77950ec 100644 --- a/src/status_im/accounts/recover/handlers.cljs +++ b/src/status_im/accounts/recover/handlers.cljs @@ -11,8 +11,7 @@ [status-im.navigation.handlers :as nav])) (defn account-recovered [result] - (let [_ (log/debug result) - data (json->clj result) + (let [data (json->clj result) public-key (:pubkey data) address (:address data) {:keys [public private]} (protocol/new-keypair!) diff --git a/src/status_im/chat/handlers/send_message.cljs b/src/status_im/chat/handlers/send_message.cljs index be0358ea56..6398ef9cb3 100644 --- a/src/status_im/chat/handlers/send_message.cljs +++ b/src/status_im/chat/handlers/send_message.cljs @@ -89,7 +89,6 @@ (map :name)) command' (->> (prepare-command current-public-key chat-id clock-value request content) (cu/check-author-direction db chat-id))] - (log/debug "Handler data: " request handler-data params) (dispatch [:update-message-overhead! chat-id network-status]) (dispatch [:set-chat-ui-props {:sending-in-progress? false}]) (dispatch [::send-command! add-to-chat-id (assoc params :command command') hidden-params]) @@ -328,7 +327,6 @@ current-account-id accounts] :contacts/keys [contacts] :as db} [_ {:keys [chat-id command]}]] - (log/debug "sending command: " command) (if (get-in contacts [chat-id :dapp?]) (when-let [text-message (get-in command [:content :handler-data :text-message])] (handle-message-from-bot {:message text-message diff --git a/src/status_im/components/status.cljs b/src/status_im/components/status.cljs index 1b0ae633f3..20e0e9ae4c 100644 --- a/src/status_im/components/status.cljs +++ b/src/status_im/components/status.cljs @@ -122,7 +122,7 @@ (defn complete-transactions [hashes password callback] - (log/debug :complete-transactions (boolean status) hashes password) + (log/debug :complete-transactions (boolean status) hashes) (when status (call-module #(.completeTransactions status (cljs->json hashes) password callback)))) @@ -142,7 +142,8 @@ #(do (log/debug :call-jail :jail-id jail-id) (log/debug :call-jail :path path) - (log/debug :call-jail :params params) + ;; this debug message can contain sensetive info + #_(log/debug :call-jail :params params) (let [params' (update params :context assoc :debug js/goog.DEBUG :locale rn-dependencies/i18n.locale)