diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-19 16:59:11 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-19 16:59:11 +0000 |
commit | 77a23fba355e5303da1182255bef800ee6acc468 (patch) | |
tree | 2db9083082e24f1742da09ce7899a7427f965ae9 /lib/cgi/session/pstore.rb | |
parent | a6610efee851bb8cd6dd2a312062c372abaef765 (diff) | |
download | ruby-77a23fba355e5303da1182255bef800ee6acc468.tar.gz |
* string.c (str_gsub): internal buffer should not be listed by
ObjectSpace.each_object() by String#gsub. [ruby-dev:24931]
* lib/cgi/session.rb (CGI::Session::FileStore::initialize): raise
exception if data corresponding to session specified from the
client does not exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi/session/pstore.rb')
-rw-r--r-- | lib/cgi/session/pstore.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/cgi/session/pstore.rb b/lib/cgi/session/pstore.rb index e2727b5c5e..40d2214c20 100644 --- a/lib/cgi/session/pstore.rb +++ b/lib/cgi/session/pstore.rb @@ -61,7 +61,10 @@ class CGI md5 = Digest::MD5.hexdigest(id)[0,16] path = dir+"/"+prefix+md5 path.untaint - unless File::exist? path + unless File::exist?(path) + unless session.new_session + raise RuntimeError, "uninitialized session" + end @hash = {} end @p = ::PStore.new(path) |