Skip to content

Commit 8d3ab67

Browse files
committed
Revert "Merge pull request rails#54230 from flavorjones/flavorjones-clear-site-data-on-logout"
This reverts commit 2fe5f62, reversing changes made to d1f5753. Fix: rails#5437 `Clear-Site-Data` can cause Google Chrome to lock up for upwards of 20 seconds. Ref: https://issues.chromium.org/issues/41343050 Given this issue doesn't seem likely to be fixed by Chrome soon, and given Chrome current market share, that seem like a big footgun for users.
1 parent 0643592 commit 8d3ab67

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)