1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-12 09:17:41 +03:00

Bug #1085: Increase cookie expiration time in web-UIs.

Skewed clocks can cause that cookie does not work. Expiration time increased from 1 to 10 minutes, which is the same as the default duration of the session.
This commit is contained in:
Hector Sanjuan 2012-02-02 10:22:34 +01:00
parent 00cf42e6b6
commit f9b9f1a0cd
3 changed files with 3 additions and 3 deletions

View File

@ -340,7 +340,7 @@ get '/ui' do
return File.read(File.dirname(__FILE__)+'/ui/templates/login.html')
end
time = Time.now + 60
time = Time.now + 60*10
response.set_cookie("occi-user",
:value=>"#{session[:user]}",
:expires=>time)

View File

@ -192,7 +192,7 @@ get '/' do
return File.read(File.dirname(__FILE__)+
'/templates/login.html') unless authorized?
time = Time.now + 60
time = Time.now + 60*10
response.set_cookie("ozones-user",
:value=>"#{session[:user]}",
:expires=>time)

View File

@ -185,7 +185,7 @@ get '/' do
return File.read(File.dirname(__FILE__)+'/templates/'+templ)
end
time = Time.now + 60
time = Time.now + 60*10
response.set_cookie("one-user",
:value=>"#{session[:user]}",
:expires=>time)