message: UserController now checks for mimeType Family and rejects non-images
diff: @@ -321,6 +321,9 @@ export class UserController {
  fs.unlinkSync(user.profile.picture.path);
  }
  + const mimeFamily = file.mimetype.split('/', 1)[0];
  +
  + if ( mimeFamily === 'image' ) {
  const resizedImageBuffer = await sharp(file.path)
  .resize(config.maxProfileImageWidth, config.maxProfileImageHeight)
  .withoutEnlargement(true)
  @@ -337,6 +340,9 @@ export class UserController {
  size: resizedImageBuffer.info.size
  };
  return user.save();
  + } else {
  + throw new ForbiddenError('Forbidden format in uploaded picture: ' + mimeFamily);
  + }
  })
  .then((user) => {
  return this.cleanUserObject(id, user, currentUser);
  