# HG changeset patch # User Chris Cannam # Date 1298393295 0 # Node ID 7cec015f07ce4a03f4928f1dcf11dc26da6369ac # Parent 61f66ddb0b65f2de83944deea4f34c3607c1e1d5# Parent 83bf35c4f9d1ec4531adf7552c1c97892b3460b0 Merge from branch "live" diff -r 61f66ddb0b65 -r 7cec015f07ce app/controllers/application_controller.rb --- a/app/controllers/application_controller.rb Thu Feb 17 19:48:33 2011 +0000 +++ b/app/controllers/application_controller.rb Tue Feb 22 16:48:15 2011 +0000 @@ -263,6 +263,12 @@ uri = URI.parse(back_url) # do not redirect user to another host or to the login or register page if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) + # soundsoftware: if login page is https but back_url http, + # switch back_url to https to ensure cookie validity (#83) + if (uri.scheme == "http") && (URI.parse(request.url).scheme == "https") + uri.scheme = "https" + back_url = uri.to_s + end redirect_to(back_url) return end