Skip to content
Snippets Groups Projects

Don't preview URLs to blocked hosts

Merged Hazelnoot requested to merge fEmber/Sharkey:hazelnoot/filter-url-preview-service into develop
All threads resolved!
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -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