/[smeserver]/rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-bz8150-SSLproperty2SSLRequireSSL.patch
ViewVC logotype

Contents of /rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-bz8150-SSLproperty2SSLRequireSSL.patch

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


Revision 1.1 - (show annotations) (download)
Tue Mar 9 23:24:40 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-ibays-2_6_0-15_el7_sme, e-smith-ibays-2_6_0-16_el7_sme
* Tue Mar 09 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-15.sme
- merge SSL and SSLRequireSSL properties [SME: 8150]
  now SSLRequireSSL will force SSL to the html ibay directory and redirect to https

1 diff -Nur --no-dereference e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/initialize-default-databases e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/initialize-default-databases
2 --- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/initialize-default-databases 1969-12-31 19:00:00.000000000 -0500
3 +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/initialize-default-databases 2021-03-09 18:20:58.284000000 -0500
4 @@ -0,0 +1,35 @@
5 +#!/usr/bin/perl -w
6 +
7 +#----------------------------------------------------------------------
8 +# copyright (C) 1999-2003 Mitel Networks Corporation
9 +#
10 +# This program is free software; you can redistribute it and/or modify
11 +# it under the terms of the GNU General Public License as published by
12 +# the Free Software Foundation; either version 2 of the License, or
13 +# (at your option) any later version.
14 +#
15 +# This program is distributed in the hope that it will be useful,
16 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
17 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 +# GNU General Public License for more details.
19 +#
20 +# You should have received a copy of the GNU General Public License
21 +# along with this program; if not, write to the Free Software
22 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 +#
24 +# Technical support for this program is available from Mitel Networks
25 +# Please visit our web site www.mitel.com/sme/ for details.
26 +#----------------------------------------------------------------------
27 +package esmith;
28 +
29 +use strict;
30 +use esmith::util;
31 +
32 +if (esmith::util::initialize_default_databases())
33 +{
34 + exit 0;
35 +}
36 +else
37 +{
38 + exit 1;
39 +}
40 diff -Nur --no-dereference e-smith-ibays-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays e-smith-ibays-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays
41 --- e-smith-ibays-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays 2021-03-08 15:10:26.507000000 -0500
42 +++ e-smith-ibays-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays 2021-03-09 18:20:58.028000000 -0500
43 @@ -93,7 +93,6 @@
44 my $followSymLinks = $properties{'FollowSymLinks'} || "disabled";
45 my $indexes = $properties{'Indexes'} || "enabled";
46 my $sslRequireSSL = $properties{'SSLRequireSSL'} || "disabled";
47 - my $ssldb = $properties{'SSL'} || 'disabled';
48
49 $OUT .= "\n";
50 $OUT .= "#------------------------------------------------------------\n";
51 @@ -102,7 +101,7 @@
52
53 $OUT .= "\n";
54 $OUT .= "<Directory /home/e-smith/files/ibays/$key/html>\n";
55 - if (($sslRequireSSL eq 'enabled') || ($ssldb eq 'enabled'))
56 + if ($sslRequireSSL eq 'enabled')
57 {
58 $OUT .=" SSLRequireSSL\n";
59 }
60 diff -Nur --no-dereference e-smith-ibays-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent e-smith-ibays-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent
61 --- e-smith-ibays-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent 2021-03-08 15:10:26.500000000 -0500
62 +++ e-smith-ibays-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent 2021-03-09 18:20:57.789000000 -0500
63 @@ -10,7 +10,7 @@
64 my $ibay = $virtualHostContent;
65 my $basedir = "/home/e-smith/files/ibays/$ibay";
66 my $cgiBin = $accounts->get_prop($ibay, "CgiBin") || "";
67 - my $ssl_domain = $accounts->get_prop($ibay, "SSL") || "disabled";
68 + my $ssl_domain = $accounts->get_prop($ibay, "SSLRequireSSL") || "disabled";
69
70 $OUT .= " DocumentRoot $basedir/html\n";
71
72 @@ -51,7 +51,7 @@
73 $OUT .= " # $key ibay ($name)\n";
74 $OUT .= "\n";
75
76 - if (( $port ne $httpsPort ) && (($ibay->prop('SSL') || 'disabled') eq 'enabled')){
77 + if (( $port ne $httpsPort ) && (($ibay->prop('SSLRequireSSL') || 'disabled') eq 'enabled')){
78 my $portspec = ($httpsPort eq 443) ? "" : ":$httpsPort";
79 $OUT .= " RewriteEngine on\n";
80 $OUT .= " RewriteRule ^/$key(/.*|\$) https://%{HTTP_HOST}${portspec}/$key\$1 \[L,R\]\n";
81 diff -Nur --no-dereference e-smith-ibays-2.6.0.old/root/etc/e-smith/web/functions/ibays e-smith-ibays-2.6.0/root/etc/e-smith/web/functions/ibays
82 --- e-smith-ibays-2.6.0.old/root/etc/e-smith/web/functions/ibays 2016-02-05 17:52:35.000000000 -0500
83 +++ e-smith-ibays-2.6.0/root/etc/e-smith/web/functions/ibays 2021-03-09 18:20:57.557000000 -0500
84 @@ -120,7 +120,7 @@
85 <field type="select" id="CgiBin" options="'disabled' => 'DISABLED', 'enabled' => 'ENABLED'">
86 <label>ALLOW_DYNAMIC_CONTENT</label>
87 </field>
88 - <field type="select" id="SSL" options="'disabled' => 'DISABLED', 'enabled' => 'ENABLED'">
89 + <field type="select" id="SSLRequireSSL" options="'disabled' => 'DISABLED', 'enabled' => 'ENABLED'">
90 <label>HTTPS_Only</label>
91 </field>
92 <subroutine src="print_save_or_add_button()" />
93 diff -Nur --no-dereference e-smith-ibays-2.6.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/ibays.pm e-smith-ibays-2.6.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/ibays.pm
94 --- e-smith-ibays-2.6.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/ibays.pm 2016-02-05 17:52:35.000000000 -0500
95 +++ e-smith-ibays-2.6.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/ibays.pm 2021-03-09 18:20:57.342000000 -0500
96 @@ -248,8 +248,8 @@
97 $rec->prop('PublicAccess'));
98 $q->param(-name=>'CgiBin',-value=>
99 $rec->prop('CgiBin'));
100 - $q->param(-name=>'SSL',-value=>
101 - $rec->prop('SSL'));
102 + $q->param(-name=>'SSLRequireSSL',-value=>
103 + $rec->prop('SSLRequireSSL'));
104 }
105 } else {
106 print qq(
107 @@ -510,16 +510,16 @@
108
109 my $uid = $accountdb->get_next_uid();
110 if (my $acct = $accountdb->new_record($name, {
111 - Name => $self->cgi->param('description'),
112 - CgiBin => $self->cgi->param('CgiBin'),
113 - Group => $self->cgi->param('group'),
114 - PublicAccess => $self->cgi->param('publicAccess'),
115 - SSL => $self->cgi->param('SSL'),
116 - UserAccess => $self->cgi->param('userAccess'),
117 - Uid => $uid,
118 - Gid => $uid,
119 - PasswordSet => 'no',
120 - type => 'ibay',
121 + Name => $self->cgi->param('description'),
122 + CgiBin => $self->cgi->param('CgiBin'),
123 + Group => $self->cgi->param('group'),
124 + PublicAccess => $self->cgi->param('publicAccess'),
125 + SSLRequireSSL => $self->cgi->param('SSLRequireSSL'),
126 + UserAccess => $self->cgi->param('userAccess'),
127 + Uid => $uid,
128 + Gid => $uid,
129 + PasswordSet => 'no',
130 + type => 'ibay',
131 }) )
132 {
133 # Untaint $name before use in system()
134 @@ -540,12 +540,12 @@
135 if (my $acct = $accountdb->get($name)) {
136 if ($acct->prop('type') eq 'ibay') {
137 $acct->merge_props(
138 - Name => $self->cgi->param('description'),
139 - CgiBin => $self->cgi->param('CgiBin'),
140 - Group => $self->cgi->param('group'),
141 - PublicAccess => $self->cgi->param('publicAccess'),
142 - SSL => $self->cgi->param('SSL'),
143 - UserAccess => $self->cgi->param('userAccess'),
144 + Name => $self->cgi->param('description'),
145 + CgiBin => $self->cgi->param('CgiBin'),
146 + Group => $self->cgi->param('group'),
147 + PublicAccess => $self->cgi->param('publicAccess'),
148 + SSLRequireSSL => $self->cgi->param('SSLRequireSSL'),
149 + UserAccess => $self->cgi->param('userAccess'),
150 );
151
152 # Untaint $name before use in system()

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