made all protocol except PC29 reject %xx characters
authordjk <djk>
Wed, 18 Aug 1999 07:53:37 +0000 (07:53 +0000)
committerdjk <djk>
Wed, 18 Aug 1999 07:53:37 +0000 (07:53 +0000)
mode console reset its top screen when you start to type in stuff

Changes
perl/DXProt.pm
perl/client.pl
perl/console.pl

diff --git a/Changes b/Changes
index 18e9f1438b67d628501323491d8051e476c46c70..7c93f082b488e781518b228cb314f5ca011867e2 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+17Aug99=======================================================================
+1. all protocol except PC29 containing %XX characters will be dumped.
+2. Changed console.pl so that if you start typing it moves the top window
+back to the bottom.
 19Jul99=======================================================================
 1. Added iota and qra clauses to sh/dx as well, these take optional arguments
 and will look for the appropriate strings.
index 30b1b27899a773acd6c12930719acf8e6377d73c..7d429b1b7c3aa74375294b23169721742863f2c6 100644 (file)
@@ -149,7 +149,13 @@ sub normal
        my ($pcno) = $field[0] =~ /^PC(\d\d)/; # just get the number
        return unless $pcno;
        return if $pcno < 10 || $pcno > 51;
-       
+
+       # dump bad protocol messages unless it is a PC29
+       if ($line =~ /\%[0-9A-F][0-9A-F]/o && $pcno != 29) {
+               dbg('chan', "CORRUPT protocol message - dumped");
+               return;
+       }
+
        # local processing 1
        my $pcr;
        eval {
index 1914ab3179e53e54365c685a05b1022c95937f05..2e6a4f1727452652d1b32f3ccf7353e2016cedd9 100755 (executable)
@@ -261,6 +261,7 @@ sub dochat
                for (;;) {
                        if ($csort eq 'telnet') {
                                $line = $sock->get();
+                               cease(11) unless $line;          # the socket has gone away?
                                $line =~ s/\r\n/\n/og;
                                chomp;
                        } elsif ($csort eq 'ax25' || $csort eq 'prog') {
index 41eb8016cc38249e2eccb891b38fedc05cede131..50196907829e16608af9cfc0a4f95f0132efdbcb 100755 (executable)
@@ -159,6 +159,7 @@ sub rec_stdin
        #  $prbuf =~ s/\n/\\n/;
        #  print "sys: $r ($prbuf)\n";
        if (defined $r) {
+               
                if ($r eq KEY_ENTER || $r eq "\n" || $r eq "\r") {
                        
                        # save the lines
@@ -266,6 +267,13 @@ sub rec_stdin
                                beep();
                        }
                } elsif ($r ge ' ' && $r le '~') {
+                       # move the top screen back to the bottom if you type something
+                       if ($spos < @shistory - 1) {
+                               $spos = @shistory;
+                               show_screen();
+                       }
+               
+                       # insert the character into the keyboard buffer
                        if ($pos < $lth) {
                                my $a = substr($inbuf, 0, $pos);
                                my $b = substr($inbuf, $pos);