Skip to content

Commit

Permalink
Remove old warning code about unconfigured 'hmac_key' (#3956)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamantazFox committed Jul 1, 2023
2 parents a0cc807 + d7568ac commit 419dbef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
9 changes: 2 additions & 7 deletions src/invidious.cr
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ end
# Simple alias to make code easier to read
alias IV = Invidious

CONFIG = Config.load
HMAC_KEY_CONFIGURED = CONFIG.hmac_key != nil
HMAC_KEY = CONFIG.hmac_key || Random::Secure.hex(32)
CONFIG = Config.load
HMAC_KEY = CONFIG.hmac_key

PG_DB = DB.open CONFIG.database_url
ARCHIVE_URL = URI.parse("https://archive.org")
Expand Down Expand Up @@ -230,10 +229,6 @@ 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) %}
Expand Down
8 changes: 0 additions & 8 deletions src/invidious/views/template.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,6 @@
</div>
<% end %>

<% if env.get? "user" %>
<% if !HMAC_KEY_CONFIGURED && CONFIG.admins.includes? env.get("user").as(Invidious::User).email %>
<div class="h-box">
<h3><p>Message for admin: please configure hmac_key, <a href="https://github.com/iv-org/invidious/issues/3854">see more here</a>.</p></h3>
</div>
<% end %>
<% end %>

<%= content %>

<footer>
Expand Down

0 comments on commit 419dbef

Please sign in to comment.