Skip to content

Commit

Permalink
Don't save recent maps list in PRSM file, as this is a security risk
Browse files Browse the repository at this point in the history
  • Loading branch information
micrology committed Dec 5, 2024
1 parent 7ec9627 commit b192631
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ function loadPRSMfile(str) {
updateLastSamples(json.lastNodeSample, json.lastLinkSample)
if (json.buttons) setButtonStatus(json.buttons)
if (json.mapTitle) yNetMap.set('mapTitle', setMapTitle(json.mapTitle))
if (json.recentMaps) {
/* if (json.recentMaps) {
let recents = JSON.parse(localStorage.getItem('recents')) || {}
localStorage.setItem('recents', JSON.stringify(Object.assign(json.recentMaps, recents)))
}
} */
if (json.attributeTitles) yNetMap.set('attributeTitles', json.attributeTitles)
else yNetMap.set('attributeTitles', {})
if (json.edges.length > 0 && 'source' in json.edges[0]) {
Expand Down Expand Up @@ -792,7 +792,8 @@ export function savePRSMfile() {
version: version,
room: room,
mapTitle: elem('maptitle').innerText,
recentMaps: JSON.parse(localStorage.getItem('recents')),
// security risk to save recent maps to a file
// recentMaps: JSON.parse(localStorage.getItem('recents')),
lastNodeSample: lastNodeSample,
lastLinkSample: lastLinkSample,
// clustering, and up/down, paths between and x links away settings are not saved (and hidden property is not saved)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "participatory-system-mapper",
"version": "2.4.0",
"version": "2.4.1",
"description": "Participatory System Mapper, browser app for collaboratively creating system maps",
"keywords": [
"social network",
Expand Down
2 changes: 1 addition & 1 deletion whatsnew.js

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

0 comments on commit b192631

Please sign in to comment.