minor on SMTP

This commit is contained in:
lesion 2022-08-02 15:11:05 +02:00
parent a1b2ebc8ca
commit 008aaed27e
No known key found for this signature in database
GPG key ID: 352918250B012177
2 changed files with 3 additions and 3 deletions

View file

@ -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: {

View file

@ -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 })