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 --- 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 +++ 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 @@ -93,7 +93,6 @@ my $followSymLinks = $properties{'FollowSymLinks'} || "disabled"; my $indexes = $properties{'Indexes'} || "enabled"; my $sslRequireSSL = $properties{'SSLRequireSSL'} || "disabled"; - my $ssldb = $properties{'SSL'} || 'disabled'; $OUT .= "\n"; $OUT .= "#------------------------------------------------------------\n"; @@ -102,7 +101,7 @@ $OUT .= "\n"; $OUT .= "\n"; - if (($sslRequireSSL eq 'enabled') || ($ssldb eq 'enabled')) + if ($sslRequireSSL eq 'enabled') { $OUT .=" SSLRequireSSL\n"; } 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 --- 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 +++ 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 @@ -10,7 +10,7 @@ my $ibay = $virtualHostContent; my $basedir = "/home/e-smith/files/ibays/$ibay"; my $cgiBin = $accounts->get_prop($ibay, "CgiBin") || ""; - my $ssl_domain = $accounts->get_prop($ibay, "SSL") || "disabled"; + my $ssl_domain = $accounts->get_prop($ibay, "SSLRequireSSL") || "disabled"; $OUT .= " DocumentRoot $basedir/html\n"; @@ -51,7 +51,7 @@ $OUT .= " # $key ibay ($name)\n"; $OUT .= "\n"; - if (( $port ne $httpsPort ) && (($ibay->prop('SSL') || 'disabled') eq 'enabled')){ + if (( $port ne $httpsPort ) && (($ibay->prop('SSLRequireSSL') || 'disabled') eq 'enabled')){ my $portspec = ($httpsPort eq 443) ? "" : ":$httpsPort"; $OUT .= " RewriteEngine on\n"; $OUT .= " RewriteRule ^/$key(/.*|\$) https://%{HTTP_HOST}${portspec}/$key\$1 \[L,R\]\n"; 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 --- e-smith-ibays-2.6.0.old/root/etc/e-smith/web/functions/ibays 2016-02-05 17:52:35.000000000 -0500 +++ e-smith-ibays-2.6.0/root/etc/e-smith/web/functions/ibays 2021-03-09 18:20:57.557000000 -0500 @@ -120,7 +120,7 @@ - + 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 --- 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 +++ 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 @@ -248,8 +248,8 @@ $rec->prop('PublicAccess')); $q->param(-name=>'CgiBin',-value=> $rec->prop('CgiBin')); - $q->param(-name=>'SSL',-value=> - $rec->prop('SSL')); + $q->param(-name=>'SSLRequireSSL',-value=> + $rec->prop('SSLRequireSSL')); } } else { print qq( @@ -510,16 +510,16 @@ my $uid = $accountdb->get_next_uid(); if (my $acct = $accountdb->new_record($name, { - Name => $self->cgi->param('description'), - CgiBin => $self->cgi->param('CgiBin'), - Group => $self->cgi->param('group'), - PublicAccess => $self->cgi->param('publicAccess'), - SSL => $self->cgi->param('SSL'), - UserAccess => $self->cgi->param('userAccess'), - Uid => $uid, - Gid => $uid, - PasswordSet => 'no', - type => 'ibay', + Name => $self->cgi->param('description'), + CgiBin => $self->cgi->param('CgiBin'), + Group => $self->cgi->param('group'), + PublicAccess => $self->cgi->param('publicAccess'), + SSLRequireSSL => $self->cgi->param('SSLRequireSSL'), + UserAccess => $self->cgi->param('userAccess'), + Uid => $uid, + Gid => $uid, + PasswordSet => 'no', + type => 'ibay', }) ) { # Untaint $name before use in system() @@ -540,12 +540,12 @@ if (my $acct = $accountdb->get($name)) { if ($acct->prop('type') eq 'ibay') { $acct->merge_props( - Name => $self->cgi->param('description'), - CgiBin => $self->cgi->param('CgiBin'), - Group => $self->cgi->param('group'), - PublicAccess => $self->cgi->param('publicAccess'), - SSL => $self->cgi->param('SSL'), - UserAccess => $self->cgi->param('userAccess'), + Name => $self->cgi->param('description'), + CgiBin => $self->cgi->param('CgiBin'), + Group => $self->cgi->param('group'), + PublicAccess => $self->cgi->param('publicAccess'), + SSLRequireSSL => $self->cgi->param('SSLRequireSSL'), + UserAccess => $self->cgi->param('userAccess'), ); # Untaint $name before use in system() diff -Nur --no-dereference e-smith-ibays-2.6.0.old/root/etc/e-smith/db/accounts/migrate/20ibay-accounts e-smith-ibays-2.6.0/root/etc/e-smith/db/accounts/migrate/20ibay-accounts --- e-smith-ibays-2.6.0.old/root/etc/e-smith/db/accounts/migrate/20ibay-accounts 2016-02-05 17:52:36.000000000 -0500 +++ e-smith-ibays-2.6.0/root/etc/e-smith/db/accounts/migrate/20ibay-accounts 2021-03-10 00:58:57.504000000 -0500 @@ -4,5 +4,15 @@ # SME9 introduced SSLRequireSSL with enabled/disabled. # This replaces local customisation, so migrate 'on' to 'enabled' $ibay->set_prop ('SSLRequireSSL', 'enabled') if (($ibay->prop ('SSLRequireSSL') || '') eq 'on'); + + # SME10 merge SSL property (setting to redirect to https) with SSLRequireSSL (setting to force SSL in a directory) + # while they have two different purpose, most admin will want to protect one directory with SSL and ease access to their + # client to gently redirect them to https, hence the merge. + my $SSL = $DB->get_prop_and_delete($ibay->key, 'SSL') || 'disabled'; + + # if SSL is enabled or SSLRequireSSL is enabled we want the new one enabled + # default remains empty for disabled for the moment + $ibay->set_prop('SSLRequireSSL','enabled') if ($SSL eq 'enabled'); + } }