Skip to content

Commit

Permalink
backport mix phx.gen.auth security improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalotomas committed Jan 4, 2025
1 parent 0872852 commit 70e215c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxies_web/live/player_settings_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ defmodule GalaxiesWeb.PlayerSettingsLive do
<input
name={@password_form[:email].name}
type="hidden"
id="hidden_players_email"
id="hidden_player_email"
value={@current_email}
/>
<.input field={@password_form[:password]} type="password" label="New password" required />
Expand Down
2 changes: 2 additions & 0 deletions lib/galaxies_web/player_auth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ defmodule GalaxiesWeb.PlayerAuth do
# end
#
defp renew_session(conn) do
delete_csrf_token()

conn
|> configure_session(renew: true)
|> clear_session()
Expand Down

0 comments on commit 70e215c

Please sign in to comment.