fix(feedback): Don't include tokens in feedback logs

This commit is contained in:
Ben Gotow 2015-02-09 16:22:45 -08:00
parent 2fc89f7d6f
commit feacf8948b

View file

@ -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: [