fix: truncate pictureUrl if too long (#1311)

This commit is contained in:
NGPixel 2020-01-03 16:35:50 -05:00
parent 0755c538ed
commit 4698afdaeb

View File

@ -204,7 +204,10 @@ module.exports = class User extends Model {
} }
// Parse picture URL // Parse picture URL
let pictureUrl = _.get(profile, 'picture', _.get(user, 'pictureUrl', null)) let pictureUrl = _.truncate(_.get(profile, 'picture', _.get(user, 'pictureUrl', null)), {
length: 255,
omission: ''
})
// Update existing user // Update existing user
if (user) { if (user) {