mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 12:14:18 +00:00
fix(server): validate url from ap to improve security
This commit is contained in:
@@ -48,6 +48,10 @@ export class ApImageService {
|
|||||||
throw new Error('invalid image: url not privided');
|
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}`);
|
this.logger.info(`Creating the Image: ${image.url}`);
|
||||||
|
|
||||||
const instance = await this.metaService.fetch();
|
const instance = await this.metaService.fetch();
|
||||||
|
|||||||
Reference in New Issue
Block a user