mirror of
https://github.com/paricafe/misskey.git
synced 2025-01-29 12:50:15 -06:00
verify that preview URL is valid
This commit is contained in:
parent
c8a1940a14
commit
d1965bf9a3
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,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