Guard against relative path wildcards and Linux root

This commit is contained in:
mtkennerly 2020-10-18 10:11:35 -04:00
parent 0d2ab44974
commit d40e20985d
3 changed files with 17 additions and 16 deletions

View file

@ -203024,29 +203024,22 @@ Scrap Galaxy:
steam: steam:
id: 723110 id: 723110
Scrap Garden: Scrap Garden:
files:
'*':
tags:
- save
when:
- os: windows
installDir: installDir:
Scrap Garden: {} Scrap Garden: {}
registry: registry:
HKEY_CURRENT_USER/Software/Flazm/scrap-garden: HKEY_CURRENT_USER/Software/Flazm/scrap-garden:
tags: tags:
- config - config
- save
steam: steam:
id: 465760 id: 465760
Scrap Garden - The Day Before: Scrap Garden - The Day Before:
files:
'*':
tags:
- save
when:
- os: windows
installDir: installDir:
Scrap Garden - The Day Before: {} Scrap Garden - The Day Before: {}
registry:
HKEY_CURRENT_USER/Software/Flazm/scrap-garden-tdb:
tags:
- save
steam: steam:
id: 508390 id: 508390
Scrap Mechanic: Scrap Mechanic:

View file

@ -94909,13 +94909,11 @@ Scrap Galaxy:
pageId: 75115 pageId: 75115
revId: 868502 revId: 868502
Scrap Garden: Scrap Garden:
irregularPath: true
pageId: 34773 pageId: 34773
revId: 1002312 revId: 1005918
Scrap Garden - The Day Before: Scrap Garden - The Day Before:
irregularPath: true
pageId: 51288 pageId: 51288
revId: 1002313 revId: 1005919
Scrap Mechanic: Scrap Mechanic:
pageId: 44908 pageId: 44908
revId: 959815 revId: 959815

View file

@ -331,6 +331,16 @@ export function pathIsTooBroad(path: string): boolean {
return true; return true;
} }
// Root:
if (path === "/") {
return true;
}
// Relative path wildcard:
if (path.startsWith("*")) {
return true;
}
return false; return false;
} }