~vcs-imports/ipfire/ipfire-2.x

« back to all changes in this revision

Viewing changes to html/cgi-bin/updatexlrator.cgi

  • Committer: Peter Müller
  • Date: 2022-04-23 14:27:56 UTC
  • mto: This revision was merged to the branch mainline in revision 9750.
  • Revision ID: git-v1:7a981d94cb2c3e48ecaf07c506c8353a2c839d79
SSH: do not send spoofable TCP keep alive messages

By default, both SSH server and client rely on TCP-based keep alive
messages to detect broken sessions, which can be spoofed rather easily
in order to keep a broken session opened (and vice versa).

Since we rely on SSH-based keep alive messages, which are not vulnerable
to this kind of tampering, there is no need to double-check connections
via TCP keep alive as well.

This patch thereof disables using TCP keep alive for both SSH client and
server scenario. For usability reasons, a timeout of 5 minutes (10
seconds * 30 keep alive messages = 300 seconds) will be used for both
client and server configuration, as 60 seconds were found to be too
short for unstable connectivity scenarios.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
369
369
 
370
370
&Header::showhttpheaders();
371
371
 
372
 
&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, $Header::extraHead);
 
372
&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, '');
373
373
 
374
374
&Header::openbigbox('100%', 'left', '', $errormessage);
375
375
 
532
532
 
533
533
                        $id++;
534
534
                        if ($id % 2) {
535
 
                                print "<tr class='table1colour'>\n"; }
 
535
                                print "<tr bgcolor='$Header::table1colour'>\n"; }
536
536
                        else {
537
 
                                print "<tr class='table2colour'>\n"; }
 
537
                                print "<tr bgcolor='$Header::table2colour'>\n"; }
538
538
 
539
539
                        $filesize = $size_updatefile;
540
540
                        1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
823
823
 
824
824
        $id++;
825
825
        if ($id % 2) {
826
 
                print "<tr class='color20'>\n"; }
 
826
                print "<tr bgcolor=''$color{'color20'}'>\n"; }
827
827
        else {
828
 
                print "<tr class='color22'>\n"; }
 
828
                print "<tr bgcolor=''$color{'color22'}'>\n"; }
829
829
 
830
830
        print "<td class='base' align='center'><nobr>&nbsp;";
831
831
 
1162
1162
 
1163
1163
                $id++;
1164
1164
                if ($id % 2) {
1165
 
                        print "<tr class='table1colour'>\n"; }
 
1165
                        print "<tr bgcolor='$Header::table1colour'>\n"; }
1166
1166
                else {
1167
 
                        print "<tr class='table2colour'>\n"; }
 
1167
                        print "<tr bgcolor='$Header::table2colour'>\n"; }
1168
1168
 
1169
1169
                $filesize = $size_updatefile;
1170
1170
                1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
1522
1522
sub percentbar
1523
1523
{
1524
1524
  my $percent = $_[0];
 
1525
  my $fg = '#a0a0a0';
 
1526
  my $bg = '#e2e2e2';
1525
1527
 
1526
1528
  if ($percent =~ m/^(\d+)%$/ )
1527
1529
  {
1528
1530
    print <<END
1529
 
<table width='100' border='1' cellspacing='0' cellpadding='0' class='percent-box'>
 
1531
<table width='100' border='1' cellspacing='0' cellpadding='0' style='border-width:1px;border-style:solid;border-color:$fg;width:100px;height:10px;'>
1530
1532
<tr>
1531
1533
END
1532
1534
;
1533
1535
    if ($percent eq "100%") {
1534
 
      print "<td width='100%' class='percent-bar'>"
 
1536
      print "<td width='100%' bgcolor='$fg' style='background-color:$fg;border-style:solid;border-width:1px;border-color:$bg'>"
1535
1537
    } elsif ($percent eq "0%") {
1536
 
      print "<td width='100%' class='percent-space'>"
 
1538
      print "<td width='100%' bgcolor='$bg' style='background-color:$bg;border-style:solid;border-width:1px;border-color:$bg'>"
1537
1539
    } else {
1538
 
      print "<td width='$percent' class='percent-bar'></td><td width='" . (100-$1) . "%' class='percent-space'>"
 
1540
      print "<td width='$percent' bgcolor='$fg' style='background-color:$fg;border-style:solid;border-width:1px;border-color:$bg'></td><td width='" . (100-$1) . "%' bgcolor='$bg' style='background-color:$bg;border-style:solid;border-width:1px;border-color:$bg'>"
1539
1541
    }
1540
1542
    print <<END
1541
1543
<img src='/images/null.gif' width='1' height='1' alt='' /></td></tr></table>