From ad225796688d937c2571ebe2c4851cb46631cdbd Mon Sep 17 00:00:00 2001 From: Matthias Tarasiewicz Date: Sat, 10 Feb 2007 09:47:36 +0000 Subject: [PATCH] cookie fix: being logged in on more Webs at once works now [Jaques Distler] --- CHANGELOG | 1 + app/controllers/application.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a0c56d89..f4f13a24 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,6 +22,7 @@ - updated packaged sqlite3-ruby to 1.2.0 - FEATURES: + - fix: being logged in on more Webs at once works now [Jaques Distler] - Stylesheet tweaks - visual display if webs are pass-protected (div background) - Linux packaging diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 59c43eb0..1b395452 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -75,7 +75,7 @@ class ApplicationController < ActionController::Base def password_check(password) if password == @web.password - cookies['web_address'] = password + cookies[CGI.escape(@web_name)] = password true else false @@ -183,7 +183,7 @@ class ApplicationController < ActionController::Base def authorized? @web.nil? or @web.password.nil? or - cookies['web_address'] == @web.password or + cookies[CGI.escape(@web_name)] == @web.password or password_check(@params['password']) end