Check links for using an accepted scheme during validation (http, https,
ftp)
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user