1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

fix fs-job sanitization (#1375)

This commit is contained in:
Emerald Block
2022-02-13 14:07:02 -06:00
committed by GitHub
parent 4466821557
commit dab4aa9cda

View File

@@ -316,7 +316,7 @@ async function writeFileSafe(filename, contents) {
}
ipcMain.handle("fs-job", async (event, job) => {
const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/i, "_");
const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/gi, "_");
const fname = path.join(storePath, filenameSafe);
switch (job.type) {
case "read": {