# HG changeset patch # User Chris Cannam # Date 1301656381 -3600 # Node ID 3e8c33cbb8e06612d618da3bc3054426d9745bb7 # Parent 7a616ddc3331814fb70a40e74f98520bcc65dab8# Parent 7d8567890fa37eeddaa7d547544625d9fd07dda6 Merge diff -r 7a616ddc3331 -r 3e8c33cbb8e0 app/controllers/application_controller.rb --- a/app/controllers/application_controller.rb Fri Apr 01 12:03:41 2011 +0100 +++ b/app/controllers/application_controller.rb Fri Apr 01 12:13:01 2011 +0100 @@ -263,12 +263,17 @@ 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 back_url is the home page, + # change it to My Page (#125) + if (uri.path == home_path) + uri.path = uri.path + "/my" + end # 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 + back_url = uri.to_s redirect_to(back_url) return end