Skip to content

Commit 2cea54b

Browse files
committed
Remove expectation on deleting sessions. This has the potential to fail due to invalid browser cookie states. It's best to just allow the delete to continue without causing an error.
1 parent f64696a commit 2cea54b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ doc
22
coverage
33
.yardoc
44
Gemfile.lock
5+
.ruby-version
6+
.ruby-gemset

lib/aws/session_store/dynamo_db/locking/base.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def handle_error(env = nil, &block)
6565

6666
# @return [Hash] Options for deleting session.
6767
def delete_opts(sid)
68-
merge_all(table_opts(sid), expected_attributes(sid))
68+
table_opts(sid)
6969
end
7070

7171
# @return [Hash] Options for updating item in Session table.
@@ -141,11 +141,6 @@ def data_unchanged?(env, session)
141141
env['rack.initial_data'] == session
142142
end
143143

144-
# Expected attributes
145-
def expected_attributes(sid)
146-
{ :expected => { @config.table_key => {:value => sid, :exists => true} } }
147-
end
148-
149144
# Attributes to be retrieved via client
150145
def attr_opts
151146
{:attributes_to_get => ["data"],

0 commit comments

Comments
 (0)