Skip to content

Commit

Permalink
Validate showcase entries URLs are over HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiSG committed Feb 7, 2023
2 parents 9412bb3 + a84144c commit c8c234a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/showcase/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ const SPDXLicenseIds = JSON.parse(fs.readFileSync('./node_modules/spdx-license-i

function isUrl(value) {
try {
return new URL(value);
const url = new URL(value);
return url.protocol == 'https:';
} catch (_) {
return false;
}
Expand Down

0 comments on commit c8c234a

Please sign in to comment.