From feacf8948bd494116f6227d2ddd77c8a9ee46f96 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 9 Feb 2015 16:22:45 -0800 Subject: [PATCH] fix(feedback): Don't include tokens in feedback logs --- internal_packages/inbox-activity-bar/lib/activity-bar.cjsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal_packages/inbox-activity-bar/lib/activity-bar.cjsx b/internal_packages/inbox-activity-bar/lib/activity-bar.cjsx index ec50f575c..6d91ea4b7 100644 --- a/internal_packages/inbox-activity-bar/lib/activity-bar.cjsx +++ b/internal_packages/inbox-activity-bar/lib/activity-bar.cjsx @@ -114,11 +114,17 @@ ActivityBar = React.createClass _onFeedback: -> user = NamespaceStore.current().name + debugData = JSON.stringify({ queries: @state.curlHistory, queue: @state.queue, queue_pending: @state.queuePending }, null, '\t') + + # Remove API tokens from URLs included in the debug data + # This regex detects ://user:pass@ and removes it. + debugData = debugData.replace(/:\/\/(\w)*:(\w)?@/g, '://') + draft = new Message from: [NamespaceStore.current().me()] to: [