1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

delete password of user when submitting to sentry

This commit is contained in:
Tim Daubenschütz 2015-08-03 10:41:51 +02:00
parent 950e63b6d0
commit c9042a0934
4 changed files with 16 additions and 4 deletions

5
.gitignore vendored
View File

@ -6,7 +6,10 @@ lib-cov
*.out
*.pid
*.gz
*.sublime-project
*.sublime-workspace
webapp-dependencies.txt
pids
logs
results

View File

@ -22,6 +22,7 @@ class UserActions {
this.actions.updateCurrentUser({});
});
}
logoutCurrentUser() {
return UserFetcher.logout()
.then(() => {

View File

@ -4,11 +4,12 @@ import React from 'react';
import ReactAddons from 'react/addons';
import Button from 'react-bootstrap/lib/Button';
import AlertDismissable from './alert';
import requests from '../../utils/requests';
import { getLangText } from '../../utils/lang_utils';
import { mergeOptionsWithDuplicates } from '../../utils/general_utils';
import AlertDismissable from './alert';
let Form = React.createClass({
@ -91,7 +92,14 @@ let Form = React.createClass({
}
}
else {
console.logGlobal(err, false, this.getFormData());
let formData = this.getFormData();
// sentry shouldn't post the user's password
if(formData.password) {
delete formData.password;
}
console.logGlobal(err, false, formData);
this.setState({errors: [getLangText('Something went wrong, please try again later')]});
}
this.setState({submitted: false});

View File

@ -351,7 +351,7 @@ var ReactS3FineUploader = React.createClass({
},
onError(id, name, errorReason) {
Raven.captureException(errorReason);
Raven.captureException(errorReason, false, this.state.filesToUpload);
let notification = new GlobalNotificationModel(this.props.defaultErrorMessage, 'danger', 5000);
GlobalNotificationActions.appendGlobalNotification(notification);
},