diff --git a/routes/profile.vue b/routes/profile.vue index ba9218e31..27c60ea5c 100644 --- a/routes/profile.vue +++ b/routes/profile.vue @@ -37,7 +37,6 @@ profile.card.link: - (profile.card.generate) + + @@ -170,7 +178,7 @@ async checkForCard() { try { const card = await this.$axios.$get(`/profile/has-card`); - if (card.card || card.cardDark) { + if (card.card !== '' && card.cardDark !== '') { this.profile.card = card.card; this.profile.cardDark = card.cardDark; clearInterval(this.cardCheckHandle); diff --git a/server/routes/user.js b/server/routes/user.js index d14b7a0d8..f592c427f 100644 --- a/server/routes/user.js +++ b/server/routes/user.js @@ -26,7 +26,7 @@ const isSpam = (email) => { || email.length > 128; } -const replaceExtension = username => username.replace(/\.(txt|jpg|jpeg|png|pdf|gif|doc|docx|csv)$/i, '_$1'); +const replaceExtension = username => username.replace(/\.(txt|jpg|jpeg|png|pdf|gif|doc|docx|csv|js|css)$/i, '_$1'); const saveAuthenticator = async (db, type, user, payload, validForMinutes = null) => { const id = ulid();