summaryrefslogtreecommitdiff
path: root/lib/cgi/session.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cgi/session.rb')
-rw-r--r--lib/cgi/session.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb
index a44de7cb81d..0bc10d013fc 100644
--- a/lib/cgi/session.rb
+++ b/lib/cgi/session.rb
@@ -395,7 +395,7 @@ class CGI
def update
return unless @hash
begin
- f = File.open(@path, 'w')
+ f = File.open(@path, File::CREAT|File::TRUNC|File::RDWR, 0600)
f.flock File::LOCK_EX
for k,v in @hash
f.printf "%s=%s\n", CGI::escape(k), CGI::escape(String(v))