From 3e7cf1cefed527c93ff8664e8237d248b2882bf5 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 16 Feb 2022 16:20:54 +0100 Subject: [PATCH] revert: url validator for project endpoints --- app/controllers/api/projects.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index e9c15ceedf..9463049668 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -48,7 +48,7 @@ App::post('/v1/projects') ->param('teamId', '', new UID(), 'Team unique ID.') ->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true) ->param('logo', '', new Text(1024), 'Project logo.', true) - ->param('url', '', new URL(['http', 'https']), 'Project URL.', true) + ->param('url', '', new URL(), 'Project URL.', true) ->param('legalName', '', new Text(256), 'Project legal Name. Max length: 256 chars.', true) ->param('legalCountry', '', new Text(256), 'Project legal Country. Max length: 256 chars.', true) ->param('legalState', '', new Text(256), 'Project legal State. Max length: 256 chars.', true) @@ -345,7 +345,7 @@ App::patch('/v1/projects/:projectId') ->param('name', null, new Text(128), 'Project name. Max length: 128 chars.') ->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true) ->param('logo', '', new Text(1024), 'Project logo.', true) - ->param('url', '', new URL(['http', 'https']), 'Project URL.', true) + ->param('url', '', new URL(), 'Project URL.', true) ->param('legalName', '', new Text(256), 'Project legal name. Max length: 256 chars.', true) ->param('legalCountry', '', new Text(256), 'Project legal country. Max length: 256 chars.', true) ->param('legalState', '', new Text(256), 'Project legal state. Max length: 256 chars.', true)