Skip to content
Snippets Groups Projects
Commit 0da0cc80 authored by syuilo's avatar syuilo
Browse files

fix(server): validate url from ap to improve security

parent 650187de
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,10 @@ export class ApImageService {
throw new Error('invalid image: url not privided');
}
if (!image.url.startsWith('https://')) {
throw new Error('invalid image: unexpected shcema of url: ' + image.url);
}
this.logger.info(`Creating the Image: ${image.url}`);
const instance = await this.metaService.fetch();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment