sbsm 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +8 -0
- data/lib/sbsm/index.rb +1 -1
- data/lib/sbsm/redefine_19_cookie.rb +4 -4
- data/lib/sbsm/session.rb +15 -11
- metadata +5 -12
data/History.txt
CHANGED
data/lib/sbsm/index.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
class CGI
|
2
|
+
remove_const 'Cookie'
|
3
|
+
end
|
4
|
+
load '/usr/lib/ruby19/1.9.1/cgi/cookie.rb'
|
data/lib/sbsm/session.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
2
3
|
#
|
3
4
|
# State Based Session Management
|
4
5
|
# Copyright (C) 2004 Hannes Wyss
|
@@ -17,10 +18,11 @@
|
|
17
18
|
# License along with this library; if not, write to the Free Software
|
18
19
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
20
|
#
|
20
|
-
# ywesee - intellectual capital connected, Winterthurerstrasse 52, CH-8006
|
21
|
+
# ywesee - intellectual capital connected, Winterthurerstrasse 52, CH-8006 Zürich, Switzerland
|
21
22
|
# hwyss@ywesee.com
|
22
23
|
#
|
23
|
-
# Session -- sbsm --
|
24
|
+
# SBSM::Session -- sbsm -- 09.12.2012 -- mhatakeyama@ywesee.com
|
25
|
+
# SBSM::Session -- sbsm -- 22.10.2002 -- hwyss@ywesee.com
|
24
26
|
|
25
27
|
require 'sbsm/cgi'
|
26
28
|
require 'sbsm/drb'
|
@@ -201,15 +203,17 @@ module SBSM
|
|
201
203
|
end
|
202
204
|
def import_cookies(request)
|
203
205
|
reset_cookie()
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
206
|
+
if RUBY_VERSION < "1.9"
|
207
|
+
if(cuki = request.cookies[self::class::PERSISTENT_COOKIE_NAME])
|
208
|
+
cuki.each { |cuki_str|
|
209
|
+
CGI.parse(CGI.unescape(cuki_str)).each { |key, val|
|
210
|
+
key = key.intern
|
211
|
+
valid = @validator.validate(key, val.compact.last)
|
212
|
+
@cookie_input.store(key, valid)
|
213
|
+
}
|
214
|
+
}
|
215
|
+
end
|
216
|
+
end
|
213
217
|
end
|
214
218
|
@@hash_ptrn = /([^\[]+)((\[[^\]]+\])+)/
|
215
219
|
@@index_ptrn = /[^\[\]]+/
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sbsm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 1
|
8
7
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
8
|
+
- 2
|
9
|
+
version: 1.0.2
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Masaomi Hatakeyama, Zeno R.R. Davatz
|
@@ -15,18 +14,16 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2011-
|
17
|
+
date: 2011-12-09 00:00:00 +01:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: hoe
|
23
22
|
prerelease: false
|
24
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
24
|
requirements:
|
27
25
|
- - ">="
|
28
26
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 41
|
30
27
|
segments:
|
31
28
|
- 2
|
32
29
|
- 9
|
@@ -109,27 +106,23 @@ rdoc_options:
|
|
109
106
|
require_paths:
|
110
107
|
- lib
|
111
108
|
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
-
none: false
|
113
109
|
requirements:
|
114
110
|
- - ">="
|
115
111
|
- !ruby/object:Gem::Version
|
116
|
-
hash: 3
|
117
112
|
segments:
|
118
113
|
- 0
|
119
114
|
version: "0"
|
120
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
116
|
requirements:
|
123
117
|
- - ">="
|
124
118
|
- !ruby/object:Gem::Version
|
125
|
-
hash: 3
|
126
119
|
segments:
|
127
120
|
- 0
|
128
121
|
version: "0"
|
129
122
|
requirements: []
|
130
123
|
|
131
124
|
rubyforge_project: sbsm
|
132
|
-
rubygems_version: 1.
|
125
|
+
rubygems_version: 1.3.6
|
133
126
|
signing_key:
|
134
127
|
specification_version: 3
|
135
128
|
summary: Application framework for state based session management
|