mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +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. (cherry picked from commit f9b9f1a0cd9b492239411d2150834e00291540b0)
This commit is contained in:
parent
9cdfe82764
commit
cdb47d12c7
@ -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)
|
||||
|
@ -169,7 +169,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…
x
Reference in New Issue
Block a user