rsence-pre 2.1.0.19 → 2.1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/session/sessionmanager.rb +5 -1
- data/lib/session/sessionstorage.rb +13 -7
- data/lib/transporter/transporter.rb +2 -2
- data/plugins/client_pkg/info.yaml +2 -2
- data/plugins/ticket/info.yaml +2 -2
- data/plugins/ticket/ticket.rb +7 -2
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.1.0.
|
|
1
|
+
2.1.0.20.pre
|
|
@@ -75,7 +75,7 @@ module RSence
|
|
|
75
75
|
# the time, when the session will time out
|
|
76
76
|
:timeout => timeout,
|
|
77
77
|
|
|
78
|
-
:plugin_incr =>
|
|
78
|
+
:plugin_incr => @plugins.incr,
|
|
79
79
|
|
|
80
80
|
# session id, used internally
|
|
81
81
|
:ses_id => ses_id,
|
|
@@ -182,6 +182,7 @@ module RSence
|
|
|
182
182
|
ses_data[:timeout] = timeout
|
|
183
183
|
ses_data[:ses_key] = ses_key
|
|
184
184
|
ses_data[:cookie_key] = cookie_key
|
|
185
|
+
ses_data[:plugin_incr] = @plugins.incr
|
|
185
186
|
ses_id = new_ses_id( cookie_key, ses_key, timeout )
|
|
186
187
|
ses_data[:ses_id] = ses_id
|
|
187
188
|
@sessions[ ses_id ] = ses_data
|
|
@@ -312,6 +313,9 @@ module RSence
|
|
|
312
313
|
|
|
313
314
|
# binds the new cookie key to the old session data
|
|
314
315
|
@sessions[ses_id][:cookie_key] = cookie_key
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
msg.session[:plugin_incr] = @plugins.incr
|
|
315
319
|
|
|
316
320
|
# Sets the restored_session flag of msg to true
|
|
317
321
|
# It signals plugins to re-set data
|
|
@@ -207,16 +207,22 @@ module RSence
|
|
|
207
207
|
@db[:rsence_session].all do |ses_row|
|
|
208
208
|
ses_id = ses_row[:id]
|
|
209
209
|
ses_data_dump = ses_row[:ses_data]
|
|
210
|
-
|
|
210
|
+
|
|
211
211
|
if ses_data_dump == nil
|
|
212
212
|
@db[:rsence_session].filter(:id => ses_id).delete
|
|
213
213
|
@db[:rsence_uploads].filter(:ses_id => ses_id).delete
|
|
214
214
|
else
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
215
|
+
begin
|
|
216
|
+
ses_data = Marshal.load( ses_data_dump )
|
|
217
|
+
ses_key = ses_data[:ses_key]
|
|
218
|
+
@sessions[ses_id] = ses_data
|
|
219
|
+
@session_keys[ ses_key ] = ses_id
|
|
220
|
+
@session_cookie_keys[ ses_data[:cookie_key] ] = ses_id
|
|
221
|
+
rescue => e
|
|
222
|
+
warn "Unable to restore session id: #{ses_id}, error: #{e.inspect}"
|
|
223
|
+
@db[:rsence_session].filter(:id => ses_id).delete
|
|
224
|
+
@db[:rsence_uploads].filter(:ses_id => ses_id).delete
|
|
225
|
+
end
|
|
220
226
|
end
|
|
221
227
|
end
|
|
222
228
|
db_close
|
|
@@ -290,7 +296,7 @@ module RSence
|
|
|
290
296
|
@sessions.delete( ses_id )
|
|
291
297
|
|
|
292
298
|
# Removes all ticket-based storage bound to the session
|
|
293
|
-
@plugins[:
|
|
299
|
+
@plugins[:ticket].expire_ses_id( ses_id ) if @plugins
|
|
294
300
|
|
|
295
301
|
# target -> source cleanup
|
|
296
302
|
if @clone_sources.has_key?( ses_id )
|
|
@@ -38,8 +38,6 @@ module RSence
|
|
|
38
38
|
def initialize
|
|
39
39
|
@config = RSence.config[:transporter_conf]
|
|
40
40
|
@accept_req = false
|
|
41
|
-
@valuemanager = ValueManager.new
|
|
42
|
-
@sessions = SessionManager.new( self )
|
|
43
41
|
core_pkgs = {
|
|
44
42
|
:core => [:transporter, :session_storage, :session_manager, :value_manager]
|
|
45
43
|
}
|
|
@@ -51,6 +49,8 @@ module RSence
|
|
|
51
49
|
:resolved_deps => core_pkgs[:core],
|
|
52
50
|
:resolved_categories => core_pkgs
|
|
53
51
|
})
|
|
52
|
+
@valuemanager = ValueManager.new
|
|
53
|
+
@sessions = SessionManager.new( self )
|
|
54
54
|
if RSence.config[:session_conf][:reset_sessions]
|
|
55
55
|
puts "Resetting all sessions..."
|
|
56
56
|
@sessions.reset_sessions()
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Client Resource Package
|
|
4
4
|
|
|
5
5
|
# The human-readable version of the package
|
|
6
|
-
version: 2.
|
|
6
|
+
version: 2.1.0
|
|
7
7
|
|
|
8
8
|
# A brief description of the package (rdoc formatting supported)
|
|
9
9
|
description: |
|
|
@@ -17,7 +17,7 @@ description: |
|
|
|
17
17
|
reloadable: false
|
|
18
18
|
|
|
19
19
|
# System version requirement.
|
|
20
|
-
sys_version: '>= 2.
|
|
20
|
+
sys_version: '>= 2.1.0'
|
|
21
21
|
|
|
22
22
|
category: :system
|
|
23
23
|
|
data/plugins/ticket/info.yaml
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Ticket services
|
|
4
4
|
|
|
5
5
|
# The human-readable version of the package
|
|
6
|
-
version: 2.
|
|
6
|
+
version: 2.1.0
|
|
7
7
|
|
|
8
8
|
# A brief description of the package (rdoc formatting supported)
|
|
9
9
|
description: |
|
|
@@ -13,7 +13,7 @@ description: |
|
|
|
13
13
|
reloadable: false
|
|
14
14
|
|
|
15
15
|
# System version requirement.
|
|
16
|
-
sys_version: '>= 2.
|
|
16
|
+
sys_version: '>= 2.1.0'
|
|
17
17
|
|
|
18
18
|
category: :system
|
|
19
19
|
|
data/plugins/ticket/ticket.rb
CHANGED
|
@@ -179,9 +179,14 @@ class TicketPlugin < Plugin
|
|
|
179
179
|
@ticketserve.serve( msg, content, format, type )
|
|
180
180
|
end
|
|
181
181
|
|
|
182
|
-
# @private Removes data used by the session
|
|
182
|
+
# @private Removes data used by the session, takes session id
|
|
183
|
+
def expire_ses_id( ses_id )
|
|
184
|
+
@ticketserve.expire_ses( ses_id )
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# @private Removes data used by the session, takes msg
|
|
183
188
|
def expire_ses( msg )
|
|
184
|
-
|
|
189
|
+
expire_ses_id( msg.ses_id )
|
|
185
190
|
end
|
|
186
191
|
|
|
187
192
|
# Sets a custom favicon for RSence
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rsence-pre
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 79
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 2
|
|
8
8
|
- 1
|
|
9
9
|
- 0
|
|
10
|
-
-
|
|
11
|
-
version: 2.1.0.
|
|
10
|
+
- 20
|
|
11
|
+
version: 2.1.0.20
|
|
12
12
|
platform: ruby
|
|
13
13
|
authors:
|
|
14
14
|
- Riassence Inc.
|