Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
fix(uuid): use secure uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
ttshivers committed Aug 29, 2020
1 parent a2f18bf commit ef694af
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 21 deletions.
36 changes: 31 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"string-similarity": "^4.0.2",
"stylelint": "^13.6.1",
"stylelint-config-standard": "^20.0.0",
"uuid": "^8.3.0",
"v-clipboard": "^2.2.3",
"vanilla-tilt": "^1.7.0",
"vue": "^2.6.12",
Expand All @@ -67,4 +68,4 @@
"type": "git",
"url": "git+https://github.com/ttshivers/synclounge.git"
}
}
}
4 changes: 2 additions & 2 deletions src/store/modules/plex/state.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import guid from '@/utils/guid';
import { v4 as uuidv4 } from 'uuid';

const state = () => ({
user: null,
doneFetchingDevices: false,
deviceFetchPromise: null,
plexAuthToken: null,
clientIdentifier: guid(),
clientIdentifier: uuidv4(),
});

export default state;
4 changes: 2 additions & 2 deletions src/store/modules/slplayer/actions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CAF from 'caf';

import guid from '@/utils/guid';
import { v4 as uuidv4 } from 'uuid';
import { fetchJson, queryFetch } from '@/utils/fetchutils';
import {
play, pause, getDurationMs, getCurrentTimeMs, isTimeInBufferedRange,
Expand Down Expand Up @@ -94,7 +94,7 @@ export default {
commit('SET_FORCE_TRANSCODE_RETRY', false);
}

commit('SET_SESSION', guid());
commit('SET_SESSION', uuidv4());

try {
await dispatch('SEND_PLEX_DECISION_REQUEST');
Expand Down
4 changes: 2 additions & 2 deletions src/store/modules/slplayer/state.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import guid from '@/utils/guid';
import { v4 as uuidv4 } from 'uuid';
import { subtitlePositions, subtitleSizes, subtitleColors } from '@/utils/subtitleutils';

const state = () => ({
session: null,
xplexsessionId: guid(),
xplexsessionId: uuidv4(),
plexDecision: null,
mediaIndex: 0,
offsetMs: 0,
Expand Down
4 changes: 2 additions & 2 deletions src/store/modules/synclounge/actions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import CAF from 'caf';
import guid from '@/utils/guid';
import { v4 as uuidv4 } from 'uuid';
import eventhandlers from '@/store/modules/synclounge/eventhandlers';
import { combineUrl, combineRelativeUrlParts } from '@/utils/combineurl';
import { fetchJson } from '@/utils/fetchutils';
Expand Down Expand Up @@ -224,7 +224,7 @@ export default {

CREATE_AND_JOIN_ROOM: ({ getters, dispatch }) => dispatch('SET_AND_CONNECT_AND_JOIN_ROOM', {
server: getters.GET_BEST_SERVER,
room: guid(),
room: uuidv4(),
password: null,
}),

Expand Down
7 changes: 0 additions & 7 deletions src/utils/guid.js

This file was deleted.

0 comments on commit ef694af

Please sign in to comment.