/[smeserver]/rpms/e-smith-manager/sme9/e-smith-manager-2.4.0-dont_rewrite_to_https_from_localhost.patch
ViewVC logotype

Contents of /rpms/e-smith-manager/sme9/e-smith-manager-2.4.0-dont_rewrite_to_https_from_localhost.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Jan 31 21:54:06 2016 UTC (8 years, 4 months ago) by vip-ire
Branch: MAIN
CVS Tags: e-smith-manager-2_6_0-3_el6_sme
* Sun Jan 31 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-3.sme
- Don't redirect to http when login in/out of the server-manager from
  localhost [SME: 9163]

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 +$back =~ s/^http:/https:/ if $server_name eq 'localhost';
10 #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;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed