1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

fix fs-job sanitization

This commit is contained in:
EmeraldBlock 2022-02-05 22:11:59 -06:00
parent 86b104080f
commit 91cc42017f

View File

@ -316,7 +316,7 @@ async function writeFileSafe(filename, contents) {
} }
ipcMain.handle("fs-job", async (event, job) => { 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); const fname = path.join(storePath, filenameSafe);
switch (job.type) { switch (job.type) {
case "read": { case "read": {