Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Task/relax URL validation in asset profile and platform DTOs (#6910)

Thomas Kaul1b9ae69fee6e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 45137937d2..843f33f051 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the pagination in the activities table of the holding detail dialog
- Randomized the placeholder in the assistant
- Enabled the _Bull Dashboard_ in the admin control panel without requiring an environment variable (experimental)
+- Relaxed the URL validation in the asset profile DTOs to accept both `HTTP` and `HTTPS` protocols
+- Relaxed the URL validation in the platform DTOs to accept both `HTTP` and `HTTPS` protocols
- Extracted the page tabs to a reusable component
- Improved the language localization for German (`de`)
- Improved the language localization for Spanish (`es`)
diff --git a/libs/common/src/lib/dtos/create-asset-profile.dto.ts b/libs/common/src/lib/dtos/create-asset-profile.dto.ts
index 85ad73cc0e..1bd3ba9a8c 100644
--- a/libs/common/src/lib/dtos/create-asset-profile.dto.ts
+++ b/libs/common/src/lib/dtos/create-asset-profile.dto.ts
@@ -74,7 +74,7 @@ export class CreateAssetProfileDto {
@IsOptional()
@IsUrl({
- protocols: ['https'],
+ protocols: ['http', 'https'],
require_protocol: true
})
url?: string;
diff --git a/libs/common/src/lib/dtos/create-platform.dto.ts b/libs/common/src/lib/dtos/create-platform.dto.ts
index 941354c11b..e482dd2413 100644
--- a/libs/common/src/lib/dtos/create-platform.dto.ts
+++ b/libs/common/src/lib/dtos/create-platform.dto.ts
@@ -5,7 +5,7 @@ export class CreatePlatformDto {
name: string;
@IsUrl({
- protocols: ['https'],
+ protocols: ['http', 'https'],
require_protocol: true
})
url: string;
diff --git a/libs/common/src/lib/dtos/update-asset-profile.dto.ts b/libs/common/src/lib/dtos/update-asset-profile.dto.ts
index 43f5aa6172..a4981493ee 100644
--- a/libs/common/src/lib/dtos/update-asset-profile.dto.ts
+++ b/libs/common/src/lib/dtos/update-asset-profile.dto.ts
@@ -64,7 +64,7 @@ export class UpdateAssetProfileDto {
@IsOptional()
@IsUrl({
- protocols: ['https'],
+ protocols: ['http', 'https'],
require_protocol: true
})
url?: string;
diff --git a/libs/common/src/lib/dtos/update-platform.dto.ts b/libs/common/src/lib/dtos/update-platform.dto.ts
index 4c4f907afb..03ae94b21b 100644
--- a/libs/common/src/lib/dtos/update-platform.dto.ts
+++ b/libs/common/src/lib/dtos/update-platform.dto.ts
@@ -8,7 +8,7 @@ export class UpdatePlatformDto {
name: string;
@IsUrl({
- protocols: ['https'],
+ protocols: ['http', 'https'],
require_protocol: true
})
url: string;