mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-28 21:28:19 +01:00
verify that preview URL is valid
This commit is contained in:
parent
c48faca707
commit
4c6cec552e
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ export class UrlPreviewService {
|
|||
reply: FastifyReply,
|
||||
): Promise<object | undefined> {
|
||||
const url = request.query.url;
|
||||
if (typeof url !== 'string') {
|
||||
if (typeof url !== 'string' || !URL.canParse(url)) {
|
||||
reply.code(400);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue