/[smeserver]/rpms/e-smith-manager/sme10/e-smith-manager-2.8.0-bz9924-badredirection.patch
ViewVC logotype

Annotation of /rpms/e-smith-manager/sme10/e-smith-manager-2.8.0-bz9924-badredirection.patch

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


Revision 1.2 - (hide annotations) (download)
Thu Jan 19 23:44:59 2017 UTC (7 years, 4 months ago) by unnilennium
Branch: MAIN
CVS Tags: e-smith-manager-2_8_0-35_el7_sme, e-smith-manager-2_8_0-24_el7_sme, e-smith-manager-2_8_0-21_el7_sme, e-smith-manager-2_8_0-28_el7_sme, e-smith-manager-2_8_0-29_el7_sme, e-smith-manager-2_8_0-31_el7_sme, e-smith-manager-2_8_0-19_el7_sme, e-smith-manager-2_8_0-20_el7_sme, e-smith-manager-2_8_0-30_el7_sme, e-smith-manager-2_8_0-27_el7_sme, e-smith-manager-2_8_0-25_el7_sme, e-smith-manager-2_8_0-26_el7_sme, e-smith-manager-2_8_0-16_el7_sme, e-smith-manager-2_8_0-37_el7_sme, e-smith-manager-2_8_0-32_el7_sme, e-smith-manager-2_8_0-15_el7_sme, e-smith-manager-2_8_0-38_el7_sme, e-smith-manager-2_8_0-22_el7_sme, e-smith-manager-2_8_0-17_el7_sme, e-smith-manager-2_8_0-18_el7_sme, e-smith-manager-2_8_0-33_el7_sme, e-smith-manager-2_8_0-34_el7_sme, e-smith-manager-2_8_0-36_el7_sme, HEAD
Changes since 1.1: +27 -9 lines
* Mon Jan 16 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.8.0-15.sme
- fix bad redirection parameter that might reveal session information to remote site [SME: 9924]

1 unnilennium 1.1 --- e-smith-manager-2.8.0.old/root/etc/e-smith/web/common/cgi-bin/login 2017-01-16 18:52:49.634000000 -0500
2 unnilennium 1.2 +++ e-smith-manager-2.8.0/root/etc/e-smith/web/common/cgi-bin/login 2017-01-19 18:43:52.664000000 -0500
3     @@ -129,6 +129,13 @@
4     my $ip_addr = $at->ignore_ip ? undef : $ENV{REMOTE_ADDR};
5     my $redirected = 0;
6    
7     +my $b = URI->new($back);
8     +# If $back domain doesn't match $AUTH_DOMAIN, stop there do not give opportunity to log in
9     +my $domain = $AUTH_DOMAIN || $server_name;
10     +if ($b->host !~ m/\b$domain$/i) {
11     + $fatal="Bad redirection parameter: \"$back\" is not an authorized redirection.<br />\nYou may be experiencing an attack.<br />\nLogin is not possible on the above URL for your own security.<br />\nPlease manually enter the address you were trying to reach if you followed a link.";
12     + }
13     +
14     # ------------------------------------------------------------------------
15     # Set the auth cookie and redirect to $back
16     my $set_cookie_redirect = sub {
17     @@ -156,14 +163,6 @@
18     print $q->header( -cookie => $cookie );
19     #return 0 if $debug;
20    
21     - my $b = URI->new($back);
22     - # If $back domain doesn't match $AUTH_DOMAIN, pass ticket via back GET param
23     - my $domain = $AUTH_DOMAIN || $server_name;
24     - if ($b->host !~ m/\b$domain$/i) {
25 unnilennium 1.1 - $back .= $b->query ? '&' : '?';
26     - $back .= $at->cookie_name . '=' . $tkt;
27 unnilennium 1.2 - }
28     -
29 unnilennium 1.1 # For some reason, using a Location: header doesn't seem to then see the
30 unnilennium 1.2 # cookie, but a meta refresh one does - weird
31     print $q->start_html(

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