summaryrefslogtreecommitdiffhomepage
path: root/app/components
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-11-09 12:38:07 +0100
committerErik Larkö <erik@mullvad.net>2017-11-09 12:53:41 +0100
commit075f22daad44128a0fd08f0b2c38d205c490d57a (patch)
tree538b476537577152b632f6b74a2fb4081db26187 /app/components
parent07584089561a99be78590c803e891cecbdd91697 (diff)
downloadmullvadvpn-075f22daad44128a0fd08f0b2c38d205c490d57a.tar.xz
mullvadvpn-075f22daad44128a0fd08f0b2c38d205c490d57a.zip
Redact account token from logs
Diffstat (limited to 'app/components')
-rw-r--r--app/components/Support.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/components/Support.js b/app/components/Support.js
index 2dcb6ad1ee..04e6c7392d 100644
--- a/app/components/Support.js
+++ b/app/components/Support.js
@@ -3,6 +3,8 @@ import React, { Component } from 'react';
import { Layout, Container, Header } from './Layout';
import ExternalLinkSVG from '../assets/images/icon-extLink.svg';
+import type { AccountReduxState } from '../redux/account/reducers';
+
export type SupportReport = {
email: string,
message: string,
@@ -16,9 +18,10 @@ export type SupportState = {
sendState: 'INITIAL' | 'LOADING' | 'SUCCESS' | 'FAILED',
};
export type SupportProps = {
+ account: AccountReduxState,
onClose: () => void;
onViewLog: (string) => void;
- onCollectLog: () => Promise<string>;
+ onCollectLog: (Array<string>) => Promise<string>;
onSend: (email: string, message: string, savedReport: string) => void;
};
@@ -60,10 +63,15 @@ export default class Support extends Component {
}
_getLog() {
+ const toRedact = [];
+ if (this.props.account.accountToken) {
+ toRedact.push(this.props.account.accountToken.toString());
+ }
+
const { savedReport } = this.state;
return savedReport ?
Promise.resolve(savedReport) :
- this.props.onCollectLog()
+ this.props.onCollectLog(toRedact)
.then( path => {
return new Promise(resolve => this.setState({ savedReport: path }, () => resolve(path)));
});