Skip to content

Commit 6d56a2d

Browse files
carhartlewisclaude
andcommitted
fix(api): correct fileData max-length to 100MB and allow localhost in URL validation
Raise base64 @maxlength to 134_217_728 (~100MB binary) to match the service's file-size policy. Set require_tld: false on @isurl so http://localhost redirect URLs used in local/dev flows are not rejected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8b3b39b commit 6d56a2d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/api/src/attachments/upload-attachment.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class UploadAttachmentDto {
3535
})
3636
@IsString()
3737
@IsNotEmpty()
38-
@MaxLength(67_108_864)
38+
@MaxLength(134_217_728)
3939
@IsBase64()
4040
fileData: string;
4141

apps/api/src/background-checks/dto/background-check-billing.dto.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { IsString, IsUrl } from 'class-validator';
22

33
export class BackgroundCheckSetupSessionDto {
44
@IsString()
5-
@IsUrl({}, { message: 'successUrl must be a valid URL' })
5+
@IsUrl({ require_tld: false }, { message: 'successUrl must be a valid URL' })
66
successUrl: string;
77

88
@IsString()
9-
@IsUrl({}, { message: 'cancelUrl must be a valid URL' })
9+
@IsUrl({ require_tld: false }, { message: 'cancelUrl must be a valid URL' })
1010
cancelUrl: string;
1111
}
1212

@@ -17,6 +17,6 @@ export class BackgroundCheckSetupSuccessDto {
1717

1818
export class BackgroundCheckBillingPortalDto {
1919
@IsString()
20-
@IsUrl({}, { message: 'returnUrl must be a valid URL' })
20+
@IsUrl({ require_tld: false }, { message: 'returnUrl must be a valid URL' })
2121
returnUrl: string;
2222
}

0 commit comments

Comments
 (0)