mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
minor on SMTP
This commit is contained in:
parent
a1b2ebc8ca
commit
008aaed27e
2 changed files with 3 additions and 3 deletions
|
@ -64,6 +64,9 @@ export default {
|
||||||
},
|
},
|
||||||
async fetch () {
|
async fetch () {
|
||||||
this.smtp = await this.$axios.$get('/settings/smtp').catch(_e => ({ auth: {} }))
|
this.smtp = await this.$axios.$get('/settings/smtp').catch(_e => ({ auth: {} }))
|
||||||
|
if (!this.smtp.auth) {
|
||||||
|
this.smtp.auth = {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: mapState(['settings']),
|
computed: mapState(['settings']),
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -120,9 +120,6 @@ module.exports = {
|
||||||
|
|
||||||
async getImageFromURL (url) {
|
async getImageFromURL (url) {
|
||||||
log.debug(`getImageFromURL ${url}`)
|
log.debug(`getImageFromURL ${url}`)
|
||||||
if(!/^https?:\/\//.test(url)) {
|
|
||||||
throw Error('Hacking attempt?')
|
|
||||||
}
|
|
||||||
|
|
||||||
const filename = crypto.randomBytes(16).toString('hex')
|
const filename = crypto.randomBytes(16).toString('hex')
|
||||||
const sharpStream = sharp({ failOnError: true })
|
const sharpStream = sharp({ failOnError: true })
|
||||||
|
|
Loading…
Reference in a new issue