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:
parent
00cf42e6b6
commit
f9b9f1a0cd
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user