diff --git a/.github/workflows/auto-close-duplicate.yaml b/.github/workflows/auto-close-duplicate.yaml index aa6457ed..2eea099e 100644 --- a/.github/workflows/auto-close-duplicate.yaml +++ b/.github/workflows/auto-close-duplicate.yaml @@ -21,7 +21,7 @@ jobs: # Get issues with state to compare. Supported state: 'all', 'closed', 'open'. state: open # If similarity is higher than this threshold([0,1]), issue will be marked as duplicate. - threshold: 0.6 + threshold: 0.9 # Reactions to be add to comment when potential duplicates are detected. # Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes" reactions: '' diff --git a/src/invidious.cr b/src/invidious.cr index b5abd5c7..27c4775e 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -57,8 +57,9 @@ end # Simple alias to make code easier to read alias IV = Invidious -CONFIG = Config.load -HMAC_KEY = CONFIG.hmac_key || Random::Secure.hex(32) +CONFIG = Config.load +HMAC_KEY_CONFIGURED = CONFIG.hmac_key != nil +HMAC_KEY = CONFIG.hmac_key || Random::Secure.hex(32) PG_DB = DB.open CONFIG.database_url ARCHIVE_URL = URI.parse("https://archive.org") @@ -230,6 +231,10 @@ Kemal.config.host_binding = Kemal.config.host_binding != "0.0.0.0" ? Kemal.confi Kemal.config.port = Kemal.config.port != 3000 ? Kemal.config.port : CONFIG.port Kemal.config.app_name = "Invidious" +if !HMAC_KEY_CONFIGURED + LOGGER.warn("Please configure hmac_key by July 1st, see more here: https://github.com/iv-org/invidious/issues/3854") +end + # Use in kemal's production mode. # Users can also set the KEMAL_ENV environmental variable for this to be set automatically. {% if flag?(:release) || flag?(:production) %} diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 5852b63e..63be2bda 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -94,6 +94,14 @@ <% end %>
+ <% if env.get? "user" %> + <% if !HMAC_KEY_CONFIGURED && CONFIG.admins.includes? env.get("user").as(Invidious::User).email %> +
+

Message for admin: please configure hmac_key, see more here.

+
+ <% end %> + <% end %> + <%= content %>