Replacing md5 in favor of sha256 for stronger anonymization, #355
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
50
mopidy_iris/static/app.min.js
vendored
50
mopidy_iris/static/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -98,7 +98,7 @@
|
||||
|
||||
// Release details
|
||||
// These are automatically injected to built HTML
|
||||
var build = "1548619062";
|
||||
var build = "1548642142";
|
||||
var version = "3.32.0";
|
||||
|
||||
// Construct the script tag
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
"style-loader": "^0.13.2",
|
||||
"url-loader": "^0.5.9",
|
||||
"fs-copy-file": "2.1.2",
|
||||
"md5": "2.2.1",
|
||||
"js-sha256": "^0.9.0",
|
||||
"node-sass": "^4",
|
||||
"react": "^16.7.0",
|
||||
"react-dom": "^16.7.0",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
import ReactGA from 'react-ga';
|
||||
import Mopidy from 'mopidy';
|
||||
import md5 from 'md5';
|
||||
import { sha256 } from 'js-sha256';
|
||||
|
||||
import * as helpers from '../../helpers';
|
||||
|
||||
@ -244,7 +244,7 @@ const MopidyMiddleware = (function(){
|
||||
|
||||
case 'MOPIDY_CONNECTED':
|
||||
if (store.getState().ui.allow_reporting){
|
||||
var hashed_hostname = md5(window.location.hostname);
|
||||
var hashed_hostname = sha256(window.location.hostname);
|
||||
ReactGA.event({ category: 'Mopidy', action: 'Connected', label: hashed_hostname });
|
||||
}
|
||||
store.dispatch(uiActions.createNotification({content: 'Mopidy connected'}));
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
import ReactGA from 'react-ga';
|
||||
import md5 from 'md5';
|
||||
import { sha256 } from 'js-sha256';
|
||||
|
||||
var helpers = require('./../../helpers');
|
||||
var coreActions = require('../core/actions');
|
||||
@ -9,10 +9,6 @@ var uiActions = require('../ui/actions');
|
||||
var pusherActions = require('../pusher/actions');
|
||||
|
||||
const SpotifyMiddleware = (function(){
|
||||
|
||||
/**
|
||||
* The actual middleware inteceptor
|
||||
**/
|
||||
return store => next => action => {
|
||||
var spotify = store.getState().spotify;
|
||||
|
||||
@ -33,7 +29,7 @@ const SpotifyMiddleware = (function(){
|
||||
if (store.getState().ui.allow_reporting){
|
||||
var hashed_username = null
|
||||
if (store.getState().spotify.me){
|
||||
hashed_username = md5(store.getState().spotify.me);
|
||||
hashed_username = sha256(store.getState().spotify.me);
|
||||
ReactGA.set({userId: hashed_username});
|
||||
}
|
||||
ReactGA.event({ category: 'Spotify', action: 'Authorization revoked', label: hashed_username});
|
||||
@ -470,7 +466,7 @@ const SpotifyMiddleware = (function(){
|
||||
}
|
||||
|
||||
if (store.getState().ui.allow_reporting){
|
||||
var hashed_username = md5(me.id);
|
||||
var hashed_username = sha256(me.id);
|
||||
ReactGA.set({userId: hashed_username});
|
||||
ReactGA.event({category: 'Spotify', action: 'Authorization verified', label: hashed_username});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user