Skip to content

Commit d5e4f20

Browse files
authored
Merge pull request rails#54379 from byroot/revert-logout
Revert "Clear-Site-Data in generated authentication code"
2 parents 0643592 + 8d3ab67 commit d5e4f20

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

railties/CHANGELOG.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424

2525
*Petrik de Heus*
2626

27-
* The authentication generator's `SessionsController` sets the `Clear-Site-Data` header on logout.
28-
29-
By default the header will be set to `"cache","storage"` to help prevent data leakage after
30-
logout via the browser's "back/forward cache".
31-
32-
*Mike Dalessio*
33-
3427
* Introduce `RAILS_MASTER_KEY` placeholder in generated ci.yml files
3528

3629
*Steve Polito*

railties/lib/rails/generators/rails/authentication/templates/app/controllers/concerns/authentication.rb.tt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,4 @@ module Authentication
4949
Current.session.destroy
5050
cookies.delete(:session_id)
5151
end
52-
53-
def clear_site_data
54-
response.headers["Clear-Site-Data"] = '"cache","storage"'
55-
end
5652
end

railties/lib/rails/generators/rails/authentication/templates/app/controllers/sessions_controller.rb.tt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class SessionsController < ApplicationController
1616

1717
def destroy
1818
terminate_session
19-
clear_site_data
2019
redirect_to new_session_path
2120
end
2221
end

0 commit comments

Comments
 (0)