Check links for using an accepted scheme during validation (http, https,

ftp)
This commit is contained in:
Joshua Ramon Enslin 2022-03-30 13:03:04 +02:00
parent 7c02bbb8ad
commit 65aaea4097
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -202,6 +202,11 @@ final class MD_STD_IN {
throw new MDInvalidUrl("Invalid input URL"); throw new MDInvalidUrl("Invalid input URL");
} }
// Check for valid schemes
if (MD_STD::startsWithAny($input, ['https://', 'http://', 'ftp://']) === false) {
throw new MDInvalidUrl("Invalid input URL");
}
return $output; return $output;
} }