mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
check input URL scheme before continuing
This commit is contained in:
parent
f4107b1c2b
commit
f601cff5c5
1 changed files with 7 additions and 0 deletions
|
@ -139,6 +139,13 @@ export class UrlPreviewService {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enforce HTTP(S) for input URLs
|
||||||
|
const urlScheme = this.utilityService.getUrlScheme(url);
|
||||||
|
if (urlScheme !== 'http:' && urlScheme !== 'https:') {
|
||||||
|
reply.code(400);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const lang = request.query.lang;
|
const lang = request.query.lang;
|
||||||
if (Array.isArray(lang)) {
|
if (Array.isArray(lang)) {
|
||||||
reply.code(400);
|
reply.code(400);
|
||||||
|
|
Loading…
Add table
Reference in a new issue