From 008aaed27e09792d3a13657eada323abd9f804cc Mon Sep 17 00:00:00 2001 From: lesion Date: Tue, 2 Aug 2022 15:11:05 +0200 Subject: [PATCH] minor on SMTP --- components/admin/SMTP.vue | 3 +++ server/helpers.js | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/admin/SMTP.vue b/components/admin/SMTP.vue index bd2ac298..0bda92fd 100644 --- a/components/admin/SMTP.vue +++ b/components/admin/SMTP.vue @@ -64,6 +64,9 @@ export default { }, async fetch () { this.smtp = await this.$axios.$get('/settings/smtp').catch(_e => ({ auth: {} })) + if (!this.smtp.auth) { + this.smtp.auth = {} + } }, computed: mapState(['settings']), watch: { diff --git a/server/helpers.js b/server/helpers.js index dba90b3a..d1ed32ee 100644 --- a/server/helpers.js +++ b/server/helpers.js @@ -120,9 +120,6 @@ module.exports = { async getImageFromURL (url) { log.debug(`getImageFromURL ${url}`) - if(!/^https?:\/\//.test(url)) { - throw Error('Hacking attempt?') - } const filename = crypto.randomBytes(16).toString('hex') const sharpStream = sharp({ failOnError: true })