From 9e9f4819c71d1fae3e1f32475ec102b0220d6f45 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Wed, 28 Aug 2024 12:51:28 +1200 Subject: [PATCH] Make sure url starts with http:// or https:// --- scripts/seed.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/seed.js b/scripts/seed.js index 2ab3e02b..a3ffbbef 100644 --- a/scripts/seed.js +++ b/scripts/seed.js @@ -59,6 +59,7 @@ async function uploadAutoEmoji(guild, name, filename) { assert.notEqual(reg.ooye.server_origin.slice(-1), "/", "server origin must not end in slash") const botID = Buffer.from(config.discordToken.split(".")[0], "base64").toString() assert(botID.match(/^[0-9]{10,}$/), "discord token must follow the correct format") + assert.match(reg.url, /^https?:/, "url must start with http:// or https://") console.log("✅ Configuration looks good...") // database ddl...