Invidious is an alternative front-end to YouTube
Config: Make 'hmac_key' mandatory
Samantaz Fox1647092b3c77
diff --git a/src/invidious/config.cr b/src/invidious/config.crindex 9fc58409..7030c925 100644--- a/src/invidious/config.cr+++ b/src/invidious/config.cr@@ -85,7 +85,7 @@ class Config# Used to tell Invidious it is behind a proxy, so links to resources should be https://property https_only : Bool?# HMAC signing key for CSRF tokens and verifying pubsub subscriptions- property hmac_key : String?+ property hmac_key : String = ""# Domain to be used for links to resources on the site where an absolute URL is requiredproperty domain : String?# Subscribe to channels using PubSubHubbub (requires domain, hmac_key)@@ -204,6 +204,13 @@ class Configend{% end %}+ # HMAC_key is mandatory+ # See: https://github.com/iv-org/invidious/issues/3854+ if config.hmac_key.empty?+ puts "Config: 'hmac_key' is required/can't be empty"+ exit(1)+ end+# Build database_url from db.* if it's not set directlyif config.database_url.to_s.empty?if db = config.db@@ -216,7 +223,7 @@ class Configpath: db.dbname,)else- puts "Config : Either database_url or db.* is required"+ puts "Config: Either database_url or db.* is required"exit(1)endend