Index: openacs-4/packages/acs-lang/www/change-locale-include.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/change-locale-include.tcl,v diff -u -N -r1.17.2.5 -r1.17.2.6 --- openacs-4/packages/acs-lang/www/change-locale-include.tcl 16 Aug 2016 14:38:48 -0000 1.17.2.5 +++ openacs-4/packages/acs-lang/www/change-locale-include.tcl 28 Oct 2016 10:30:14 -0000 1.17.2.6 @@ -5,11 +5,9 @@ # @author Christian Hvid if { ![info exists return_url] || $return_url eq "" } { - # Use referer header - set return_url [ns_set iget [ns_conn headers] referer] - # In case the referrer URL has a protocol and host remove it - regexp {^[a-z]+://[^/]+(/.+)$} $return_url . return_url + set return_url [get_referrer -relative] } + # # Check if the passed in value or the referer is faked # Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -N -r1.140.2.54 -r1.140.2.55 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 14 Oct 2016 18:58:53 -0000 1.140.2.54 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 28 Oct 2016 10:30:14 -0000 1.140.2.55 @@ -261,7 +261,7 @@ set url [ns_set get [ns_conn headers] Referer] if {$relative_p} { # In case the referrer URL has a protocol and host remove it - regexp {^[a-z]+://[^/]+(/.+)$} $url . url + regexp {^[a-z]+://[^/]+(/.*)$} $url . url } return $url }