From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 1/2] mail.cgi: add support for implicit TLS usage Date: Mon, 03 Feb 2020 15:51:40 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7056540043190937205==" List-Id: --===============7056540043190937205== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, Unfortunately this does not execute. I cannot even load the page without subm= itting the form: I have this in my errors log file: exists argument is not a HASH or ARRAY element or a subroutine at /srv/web/ip= fire/cgi-bin/mail.cgi line 159. [Mon Feb 03 15:49:48.783276 2020] [cgid:error] [pid 5562:tid 128451449181952]= [client 192.168.190.117:61657] End of script output before headers: mail.cgi= , referer: https://192.168.190.1:444/ Best, -Michael > On 31 Jan 2020, at 16:31, Peter M=C3=BCller wr= ote: >=20 > Fixes #12161 >=20 > Reported-by: Michael Tremer > Signed-off-by: Peter M=C3=BCller > --- > html/cgi-bin/mail.cgi | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) >=20 > diff --git a/html/cgi-bin/mail.cgi b/html/cgi-bin/mail.cgi > index 25589046e..8c1b2d4e4 100755 > --- a/html/cgi-bin/mail.cgi > +++ b/html/cgi-bin/mail.cgi > @@ -2,7 +2,7 @@ > ###########################################################################= #### > # = # > # IPFire.org - A linux based firewall = # > -# Copyright (C) 2015 IPFire Team = # > +# Copyright (C) 2007-2020 IPFire Team = # > # = # > # This program is free software: you can redistribute it and/or modify = # > # it under the terms of the GNU General Public License as published by = # > @@ -110,8 +110,8 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){ #Save= Button on configsite >=20 > $dma{'SMARTHOST'} =3D $cgiparams{'txt_mailserver'}; > $dma{'PORT'} =3D $cgiparams{'txt_mailport'}; > - $dma{'STARTTLS'} =3D '' if ($cgiparams{'mail_tls'}); > - $dma{'SECURETRANSFER'} =3D '' if exists $dma{'STARTTLS'}; > + $dma{'STARTTLS'} =3D '' if ($cgiparams{'mail_tls'}{'explicit'}); > + $dma{'SECURETRANS'} =3D '' if ($cgiparams{'mail_tls'}{'explicit'} || $cg= iparams{'mail_tls'}{'implicit'}); > $dma{'SPOOLDIR'} =3D "/var/spool/dma"; > $dma{'FULLBOUNCE'} =3D ''; > $dma{'MAILNAME'} =3D "$mainsettings{'HOSTNAME'}.$mainsettings{DOMAINNAME= }"; > @@ -140,8 +140,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'email testmail'= }"){ #Testmail button on >=20 > #FUNCTIONS > sub configsite{ > -=09 > - > #If update set fieldvalues new > if($cgiparams{'update'} eq 'on'){ > $mail{'USEMAIL'} =3D 'on'; > @@ -156,7 +154,9 @@ sub configsite{ > } > #find preselections > $checked{'usemail'}{$mail{'USEMAIL'}} =3D 'CHECKED'; > - $checked{'mail_tls'}{'on'} =3D 'CHECKED' if exists $dma{'STARTTLS'}; > + $selected{'mail_tls'}{'explicit'} =3D 'selected' if exists $dma{'STARTTLS= '}; > + $selected{'mail_tls'}{'implicit'} =3D 'selected' if exists $dma{'SECURETR= ANS'} and not $dma{'STARTTLS'}; > + $selected{'mail_tls'}{'disabled'} =3D 'selected' if not exists ($dma{'SEC= URETRANS'} and $dma{'STARTTLS'}); > =09 > #Open site > &Header::openpage($Lang::tr{'email settings'}, 1, ''); > @@ -226,7 +226,13 @@ END > > > $Lang::tr{'email tls'} > - > + > + > + > + > + > > END > if (! -z $dmafile && $mail{'USEMAIL'} eq 'on' && !$errormessage){ > --=20 > 2.16.4 --===============7056540043190937205==--