1 |
vip-ire |
1.1 |
diff -Nur e-smith-manager-2.4.0/root/etc/e-smith/web/common/cgi-bin/login e-smith-manager-2.4.0_bz9163/root/etc/e-smith/web/common/cgi-bin/login |
2 |
|
|
--- e-smith-manager-2.4.0/root/etc/e-smith/web/common/cgi-bin/login 2013-06-06 18:12:43.000000000 +0200 |
3 |
|
|
+++ e-smith-manager-2.4.0_bz9163/root/etc/e-smith/web/common/cgi-bin/login 2016-01-31 22:47:19.864541826 +0100 |
4 |
|
|
@@ -101,7 +101,7 @@ |
5 |
|
|
#warn "back from cgi param is $back\n" if $back; |
6 |
|
|
$back ||= $ENV{HTTP_REFERER} if $ENV{HTTP_REFERER} && $BACK_REFERER; |
7 |
|
|
$back = uri_unescape($back) if $back && $back =~ m/^https?%3A%2F%2F/i; |
8 |
|
|
-$back =~ s/^http:/https:/; |
9 |
vip-ire |
1.2 |
+$back =~ s/^http:/https:/ if $server_name ne 'localhost'; |
10 |
vip-ire |
1.1 |
#warn "back is $back\n"; |
11 |
|
|
if ($back && $back =~ m!^/!) { |
12 |
|
|
my $hostname = $server_name; |
13 |
|
|
diff -Nur e-smith-manager-2.4.0/root/etc/e-smith/web/common/cgi-bin/logout e-smith-manager-2.4.0_bz9163/root/etc/e-smith/web/common/cgi-bin/logout |
14 |
|
|
--- e-smith-manager-2.4.0/root/etc/e-smith/web/common/cgi-bin/logout 2008-10-07 19:36:17.000000000 +0200 |
15 |
|
|
+++ e-smith-manager-2.4.0_bz9163/root/etc/e-smith/web/common/cgi-bin/logout 2016-01-31 22:47:36.781542346 +0100 |
16 |
|
|
@@ -36,7 +36,7 @@ |
17 |
|
|
#warn "servername is $server_name; HOST is $ENV{HTTP_HOST}\n"; |
18 |
|
|
$server_name ||= $ENV{SERVER_NAME}; |
19 |
|
|
$server_port ||= $ENV{SERVER_PORT}; |
20 |
|
|
-$server_port = '443'; |
21 |
|
|
+$server_port ( $server_name eq 'localhost' ) ? '80' : '443'; |
22 |
|
|
my $AUTH_DOMAIN = $server_name; |
23 |
|
|
my $back = $q->cookie($at->back_cookie_name) if $at->back_cookie_name; |
24 |
|
|
$back ||= $q->param($at->back_arg_name) if $at->back_arg_name; |