From 6c55d58b2da1ff645eec76b706a1dba2e380bc7e Mon Sep 17 00:00:00 2001 From: Bastien DUMONT <bdumont@grandlyon.com> Date: Tue, 20 Sep 2022 15:17:17 +0200 Subject: [PATCH] publish: fix login failed generated from commit 08720f6cfef57b86594e40944e947e7a5a3c6596 --- index.js | 11 ++--------- onDeleteAccount.js | 5 +---- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index 1915f0b..e1bf2d2 100644 --- a/index.js +++ b/index.js @@ -173,7 +173,7 @@ async function start(fields, cozyParameters) { consentId: consent.ID, }) } else { - // AlternateStart + log('info', 'Alternate start...') const accountData = await getAccount(ACCOUNT_ID) const userConsent = await getBoConsent( boBaseUrl, @@ -181041,7 +181041,6 @@ const removeFile = async function (file) { module.exports = saveFiles; module.exports.getFileIfExists = getFileIfExists; -module.exports.sanitizeFileName = sanitizeFileName; function getFileName(entry) { let filename; @@ -181062,9 +181061,7 @@ function getFileName(entry) { } function sanitizeFileName(filename) { - return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, '') // Replace ascii control characters from 00 to 0F - // eslint-disable-next-line no-control-regex - .replace(/[\x00-\x0F]/g, ''); + return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, ''); } function checkFileSize(fileobject) { @@ -228374,10 +228371,6 @@ async function findUserPdl( return parseUserPdl(parsedReply) } catch (error) { log('error', 'Error while parsing user PDL: ' + error) - log( - 'error', - `Enedis issue ${parsedReply.Envelope.Body.Fault.detail.erreur.resultat.$.code}: ${parsedReply.Envelope.Body.Fault.faultstring}` - ) throw errors.LOGIN_FAILED } } diff --git a/onDeleteAccount.js b/onDeleteAccount.js index 78f89d5..f8992eb 100644 --- a/onDeleteAccount.js +++ b/onDeleteAccount.js @@ -180493,7 +180493,6 @@ const removeFile = async function (file) { module.exports = saveFiles; module.exports.getFileIfExists = getFileIfExists; -module.exports.sanitizeFileName = sanitizeFileName; function getFileName(entry) { let filename; @@ -180514,9 +180513,7 @@ function getFileName(entry) { } function sanitizeFileName(filename) { - return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, '') // Replace ascii control characters from 00 to 0F - // eslint-disable-next-line no-control-regex - .replace(/[\x00-\x0F]/g, ''); + return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, ''); } function checkFileSize(fileobject) { -- GitLab