Mercurial > hg > soundsoftware-site
changeset 238:83bf35c4f9d1 live
Merge from branch "bug_83"
author | Chris Cannam |
---|---|
date | Fri, 18 Feb 2011 10:02:10 +0000 |
parents | 497c5985af72 (current diff) 4b1a23d81683 (diff) |
children | 7cec015f07ce f936ec3cb58a |
files | |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controllers/application_controller.rb Thu Feb 17 19:47:09 2011 +0000 +++ b/app/controllers/application_controller.rb Fri Feb 18 10:02:10 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