mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
fix fs-job sanitization (#1375)
This commit is contained in:
parent
4466821557
commit
dab4aa9cda
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user