@felfhenor/electron 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/protocol.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felfhenor/electron",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Desktop shell for felfhenor games: disk saves, backups, logs, window handling, Steam and Discord.",
5
5
  "license": "UNLICENSED",
6
6
  "main": "./index.js",
package/protocol.js CHANGED
@@ -39,6 +39,9 @@ function protocolResolve(root, url) {
39
39
  catch {
40
40
  return undefined;
41
41
  }
42
+ // No asset path has one, and Windows would treat it as a separator: refused everywhere, not just on Windows.
43
+ if (decoded.includes('\\'))
44
+ return undefined;
42
45
  const target = path_1.default.resolve(root, `.${path_1.default.posix.normalize(`/${decoded}`)}`);
43
46
  const inside = target === root || target.startsWith(`${root}${path_1.default.sep}`);
44
47
  return inside ? target : undefined;