Fix avatar url validation
authorChocobozzz <me@florianbigard.com>
Fri, 9 Aug 2019 09:49:37 +0000 (11:49 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 9 Aug 2019 09:49:37 +0000 (11:49 +0200)
server/models/avatar/avatar.ts

index 7a370bcd30ec1e55a61a2756194958d9f32c14e4..b4014459297fdffff140c7116b19cfcdd3b6fc5a 100644 (file)
@@ -24,7 +24,7 @@ export class AvatarModel extends Model<AvatarModel> {
   filename: string
 
   @AllowNull(true)
-  @Is('AvatarFileUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'fileUrl'))
+  @Is('AvatarFileUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'fileUrl', true))
   @Column
   fileUrl: string