summaryrefslogtreecommitdiff
path: root/lib/cgi/session/pstore.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cgi/session/pstore.rb')
-rw-r--r--lib/cgi/session/pstore.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cgi/session/pstore.rb b/lib/cgi/session/pstore.rb
index 8f4beb978a9..f46dd57392c 100644
--- a/lib/cgi/session/pstore.rb
+++ b/lib/cgi/session/pstore.rb
@@ -70,6 +70,9 @@ class CGI
@hash = {}
end
@p = ::PStore.new(path)
+ @p.transaction do |p|
+ File.chmod(0600, p.path)
+ end
end
# Restore session state from the session's PStore file.