cookie fix: being logged in on more Webs at once works now [Jaques Distler]

This commit is contained in:
Matthias Tarasiewicz 2007-02-10 09:47:36 +00:00
parent 49032a99c6
commit ad22579668
2 changed files with 3 additions and 2 deletions

View file

@ -22,6 +22,7 @@
- updated packaged sqlite3-ruby to 1.2.0 - updated packaged sqlite3-ruby to 1.2.0
- FEATURES: - FEATURES:
- fix: being logged in on more Webs at once works now [Jaques Distler]
- Stylesheet tweaks - Stylesheet tweaks
- visual display if webs are pass-protected (div background) - visual display if webs are pass-protected (div background)
- Linux packaging - Linux packaging

View file

@ -75,7 +75,7 @@ class ApplicationController < ActionController::Base
def password_check(password) def password_check(password)
if password == @web.password if password == @web.password
cookies['web_address'] = password cookies[CGI.escape(@web_name)] = password
true true
else else
false false
@ -183,7 +183,7 @@ class ApplicationController < ActionController::Base
def authorized? def authorized?
@web.nil? or @web.nil? or
@web.password.nil? or @web.password.nil? or
cookies['web_address'] == @web.password or cookies[CGI.escape(@web_name)] == @web.password or
password_check(@params['password']) password_check(@params['password'])
end end