From e9d31fe993f061445ee5532c70408f498901e355 Mon Sep 17 00:00:00 2001 From: build-token <build-token> Date: Tue, 20 Sep 2022 13:41:48 +0000 Subject: [PATCH] publish: fix login failed generated from commit 08720f6cfef57b86594e40944e947e7a5a3c6596 --- index.js | 5 ++++- onDeleteAccount.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e1bf2d2..603cd56 100644 --- a/index.js +++ b/index.js @@ -181041,6 +181041,7 @@ const removeFile = async function (file) { module.exports = saveFiles; module.exports.getFileIfExists = getFileIfExists; +module.exports.sanitizeFileName = sanitizeFileName; function getFileName(entry) { let filename; @@ -181061,7 +181062,9 @@ function getFileName(entry) { } function sanitizeFileName(filename) { - return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, ''); + return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, '') // Replace ascii control characters from 00 to 0F + // eslint-disable-next-line no-control-regex + .replace(/[\x00-\x0F]/g, ''); } function checkFileSize(fileobject) { diff --git a/onDeleteAccount.js b/onDeleteAccount.js index f8992eb..78f89d5 100644 --- a/onDeleteAccount.js +++ b/onDeleteAccount.js @@ -180493,6 +180493,7 @@ const removeFile = async function (file) { module.exports = saveFiles; module.exports.getFileIfExists = getFileIfExists; +module.exports.sanitizeFileName = sanitizeFileName; function getFileName(entry) { let filename; @@ -180513,7 +180514,9 @@ function getFileName(entry) { } function sanitizeFileName(filename) { - return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, ''); + return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, '') // Replace ascii control characters from 00 to 0F + // eslint-disable-next-line no-control-regex + .replace(/[\x00-\x0F]/g, ''); } function checkFileSize(fileobject) { -- GitLab