mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Add version suffix to cookie signing salt (#1369)
This will make sure that users need to reauthenticate every time a new version is deployed. Closes https://github.com/firezone/firezone/issues/1358
This commit is contained in:
@@ -29,7 +29,12 @@ defmodule FzHttpWeb.Session do
|
||||
end
|
||||
|
||||
defp signing_salt do
|
||||
FzHttp.Config.fetch_env!(:fz_http, :cookie_signing_salt)
|
||||
[vsn | _] =
|
||||
Application.spec(:fz_http, :vsn)
|
||||
|> to_string()
|
||||
|> String.split("+")
|
||||
|
||||
FzHttp.Config.fetch_env!(:fz_http, :cookie_signing_salt) <> vsn
|
||||
end
|
||||
|
||||
defp encryption_salt do
|
||||
|
||||
@@ -65,8 +65,9 @@ defmodule FzHttpWeb.Acceptance.AuthenticationTest do
|
||||
|> fill_form(%{"email" => "foo@bar.com"})
|
||||
|> click(Query.button("Send"))
|
||||
|> assert_el(Query.text("Reset Password"))
|
||||
|> visit(~p"/dev/mailbox")
|
||||
|> assert_el(Query.text("Empty mailbox..."))
|
||||
|
||||
emails = Swoosh.Adapters.Local.Storage.Memory.all()
|
||||
refute Enum.find(emails, &(&1.to == "foo@bar.com"))
|
||||
end
|
||||
|
||||
feature "can reset password using email link", %{session: session} do
|
||||
|
||||
Reference in New Issue
Block a user